home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / plnk081.zip / pilot-link.0.8.1 / configure < prev    next >
Text File  |  1997-08-06  |  91KB  |  3,167 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.12 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
  16. ac_help="$ac_help
  17.   --enable-shared         build shared libraries [default=yes]"
  18. ac_help="$ac_help
  19.   --enable-static         build static libraries [default=yes]"
  20. ac_help="$ac_help
  21.   --with-cpp[=c++ compiler]  use C++     [default=yes]"
  22. ac_help="$ac_help
  23.   --with-readline21    use readline 2.1 [default=yes]"
  24. ac_help="$ac_help
  25.   --with-readline20    use readline 2.0 [default=yes]"
  26. ac_help="$ac_help
  27.   --with-tcl=tclbasedir   use Tcl     [default=yes]"
  28. ac_help="$ac_help
  29.   --with-itcl=iclbasedir  use Itcl    [default=yes]"
  30. ac_help="$ac_help
  31.   --with-tk=tkbasedir     use Tk      [default=yes]"
  32. ac_help="$ac_help
  33.   --with-python=pylibbase use Python  [default=yes]"
  34. ac_help="$ac_help
  35.   --with-java=jdkbase     use Java    [default=yes]"
  36. ac_help="$ac_help
  37.   --with-perl5=perl5exec  use Perl5   [default=yes]"
  38.  
  39. # Initialize some variables set by options.
  40. # The variables have the same names as the options, with
  41. # dashes changed to underlines.
  42. build=NONE
  43. cache_file=./config.cache
  44. exec_prefix=NONE
  45. host=NONE
  46. no_create=
  47. nonopt=NONE
  48. no_recursion=
  49. prefix=NONE
  50. program_prefix=NONE
  51. program_suffix=NONE
  52. program_transform_name=s,x,x,
  53. silent=
  54. site=
  55. srcdir=
  56. target=NONE
  57. verbose=
  58. x_includes=NONE
  59. x_libraries=NONE
  60. bindir='${exec_prefix}/bin'
  61. sbindir='${exec_prefix}/sbin'
  62. libexecdir='${exec_prefix}/libexec'
  63. datadir='${prefix}/share'
  64. sysconfdir='${prefix}/etc'
  65. sharedstatedir='${prefix}/com'
  66. localstatedir='${prefix}/var'
  67. libdir='${exec_prefix}/lib'
  68. includedir='${prefix}/include'
  69. oldincludedir='/usr/include'
  70. infodir='${prefix}/info'
  71. mandir='${prefix}/man'
  72.  
  73. # Initialize some other variables.
  74. subdirs=
  75. MFLAGS= MAKEFLAGS=
  76. # Maximum number of lines to put in a shell here document.
  77. ac_max_here_lines=12
  78.  
  79. ac_prev=
  80. for ac_option
  81. do
  82.  
  83.   # If the previous option needs an argument, assign it.
  84.   if test -n "$ac_prev"; then
  85.     eval "$ac_prev=\$ac_option"
  86.     ac_prev=
  87.     continue
  88.   fi
  89.  
  90.   case "$ac_option" in
  91.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  92.   *) ac_optarg= ;;
  93.   esac
  94.  
  95.   # Accept the important Cygnus configure options, so we can diagnose typos.
  96.  
  97.   case "$ac_option" in
  98.  
  99.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  100.     ac_prev=bindir ;;
  101.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  102.     bindir="$ac_optarg" ;;
  103.  
  104.   -build | --build | --buil | --bui | --bu)
  105.     ac_prev=build ;;
  106.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  107.     build="$ac_optarg" ;;
  108.  
  109.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  110.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  111.     ac_prev=cache_file ;;
  112.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  113.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  114.     cache_file="$ac_optarg" ;;
  115.  
  116.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  117.     ac_prev=datadir ;;
  118.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  119.   | --da=*)
  120.     datadir="$ac_optarg" ;;
  121.  
  122.   -disable-* | --disable-*)
  123.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  124.     # Reject names that are not valid shell variable names.
  125.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  126.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  127.     fi
  128.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  129.     eval "enable_${ac_feature}=no" ;;
  130.  
  131.   -enable-* | --enable-*)
  132.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  133.     # Reject names that are not valid shell variable names.
  134.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  135.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  136.     fi
  137.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  138.     case "$ac_option" in
  139.       *=*) ;;
  140.       *) ac_optarg=yes ;;
  141.     esac
  142.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  143.  
  144.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  145.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  146.   | --exec | --exe | --ex)
  147.     ac_prev=exec_prefix ;;
  148.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  149.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  150.   | --exec=* | --exe=* | --ex=*)
  151.     exec_prefix="$ac_optarg" ;;
  152.  
  153.   -gas | --gas | --ga | --g)
  154.     # Obsolete; use --with-gas.
  155.     with_gas=yes ;;
  156.  
  157.   -help | --help | --hel | --he)
  158.     # Omit some internal or obsolete options to make the list less imposing.
  159.     # This message is too long to be a string in the A/UX 3.1 sh.
  160.     cat << EOF
  161. Usage: configure [options] [host]
  162. Options: [defaults in brackets after descriptions]
  163. Configuration:
  164.   --cache-file=FILE       cache test results in FILE
  165.   --help                  print this message
  166.   --no-create             do not create output files
  167.   --quiet, --silent       do not print \`checking...' messages
  168.   --version               print the version of autoconf that created configure
  169. Directory and file names:
  170.   --prefix=PREFIX         install architecture-independent files in PREFIX
  171.                           [$ac_default_prefix]
  172.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  173.                           [same as prefix]
  174.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  175.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  176.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  177.   --datadir=DIR           read-only architecture-independent data in DIR
  178.                           [PREFIX/share]
  179.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  180.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  181.                           [PREFIX/com]
  182.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  183.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  184.   --includedir=DIR        C header files in DIR [PREFIX/include]
  185.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  186.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  187.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  188.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  189.   --program-prefix=PREFIX prepend PREFIX to installed program names
  190.   --program-suffix=SUFFIX append SUFFIX to installed program names
  191.   --program-transform-name=PROGRAM
  192.                           run sed PROGRAM on installed program names
  193. EOF
  194.     cat << EOF
  195. Host type:
  196.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  197.   --host=HOST             configure for HOST [guessed]
  198.   --target=TARGET         configure for TARGET [TARGET=HOST]
  199. Features and packages:
  200.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  201.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  202.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  203.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  204.   --x-includes=DIR        X include files are in DIR
  205.   --x-libraries=DIR       X library files are in DIR
  206. EOF
  207.     if test -n "$ac_help"; then
  208.       echo "--enable and --with options recognized:$ac_help"
  209.     fi
  210.     exit 0 ;;
  211.  
  212.   -host | --host | --hos | --ho)
  213.     ac_prev=host ;;
  214.   -host=* | --host=* | --hos=* | --ho=*)
  215.     host="$ac_optarg" ;;
  216.  
  217.   -includedir | --includedir | --includedi | --included | --include \
  218.   | --includ | --inclu | --incl | --inc)
  219.     ac_prev=includedir ;;
  220.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  221.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  222.     includedir="$ac_optarg" ;;
  223.  
  224.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  225.     ac_prev=infodir ;;
  226.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  227.     infodir="$ac_optarg" ;;
  228.  
  229.   -libdir | --libdir | --libdi | --libd)
  230.     ac_prev=libdir ;;
  231.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  232.     libdir="$ac_optarg" ;;
  233.  
  234.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  235.   | --libexe | --libex | --libe)
  236.     ac_prev=libexecdir ;;
  237.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  238.   | --libexe=* | --libex=* | --libe=*)
  239.     libexecdir="$ac_optarg" ;;
  240.  
  241.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  242.   | --localstate | --localstat | --localsta | --localst \
  243.   | --locals | --local | --loca | --loc | --lo)
  244.     ac_prev=localstatedir ;;
  245.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  246.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  247.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  248.     localstatedir="$ac_optarg" ;;
  249.  
  250.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  251.     ac_prev=mandir ;;
  252.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  253.     mandir="$ac_optarg" ;;
  254.  
  255.   -nfp | --nfp | --nf)
  256.     # Obsolete; use --without-fp.
  257.     with_fp=no ;;
  258.  
  259.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  260.   | --no-cr | --no-c)
  261.     no_create=yes ;;
  262.  
  263.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  264.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  265.     no_recursion=yes ;;
  266.  
  267.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  268.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  269.   | --oldin | --oldi | --old | --ol | --o)
  270.     ac_prev=oldincludedir ;;
  271.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  272.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  273.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  274.     oldincludedir="$ac_optarg" ;;
  275.  
  276.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  277.     ac_prev=prefix ;;
  278.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  279.     prefix="$ac_optarg" ;;
  280.  
  281.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  282.   | --program-pre | --program-pr | --program-p)
  283.     ac_prev=program_prefix ;;
  284.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  285.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  286.     program_prefix="$ac_optarg" ;;
  287.  
  288.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  289.   | --program-suf | --program-su | --program-s)
  290.     ac_prev=program_suffix ;;
  291.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  292.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  293.     program_suffix="$ac_optarg" ;;
  294.  
  295.   -program-transform-name | --program-transform-name \
  296.   | --program-transform-nam | --program-transform-na \
  297.   | --program-transform-n | --program-transform- \
  298.   | --program-transform | --program-transfor \
  299.   | --program-transfo | --program-transf \
  300.   | --program-trans | --program-tran \
  301.   | --progr-tra | --program-tr | --program-t)
  302.     ac_prev=program_transform_name ;;
  303.   -program-transform-name=* | --program-transform-name=* \
  304.   | --program-transform-nam=* | --program-transform-na=* \
  305.   | --program-transform-n=* | --program-transform-=* \
  306.   | --program-transform=* | --program-transfor=* \
  307.   | --program-transfo=* | --program-transf=* \
  308.   | --program-trans=* | --program-tran=* \
  309.   | --progr-tra=* | --program-tr=* | --program-t=*)
  310.     program_transform_name="$ac_optarg" ;;
  311.  
  312.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  313.   | -silent | --silent | --silen | --sile | --sil)
  314.     silent=yes ;;
  315.  
  316.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  317.     ac_prev=sbindir ;;
  318.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  319.   | --sbi=* | --sb=*)
  320.     sbindir="$ac_optarg" ;;
  321.  
  322.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  323.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  324.   | --sharedst | --shareds | --shared | --share | --shar \
  325.   | --sha | --sh)
  326.     ac_prev=sharedstatedir ;;
  327.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  328.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  329.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  330.   | --sha=* | --sh=*)
  331.     sharedstatedir="$ac_optarg" ;;
  332.  
  333.   -site | --site | --sit)
  334.     ac_prev=site ;;
  335.   -site=* | --site=* | --sit=*)
  336.     site="$ac_optarg" ;;
  337.  
  338.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  339.     ac_prev=srcdir ;;
  340.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  341.     srcdir="$ac_optarg" ;;
  342.  
  343.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  344.   | --syscon | --sysco | --sysc | --sys | --sy)
  345.     ac_prev=sysconfdir ;;
  346.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  347.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  348.     sysconfdir="$ac_optarg" ;;
  349.  
  350.   -target | --target | --targe | --targ | --tar | --ta | --t)
  351.     ac_prev=target ;;
  352.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  353.     target="$ac_optarg" ;;
  354.  
  355.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  356.     verbose=yes ;;
  357.  
  358.   -version | --version | --versio | --versi | --vers)
  359.     echo "configure generated by autoconf version 2.12"
  360.     exit 0 ;;
  361.  
  362.   -with-* | --with-*)
  363.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  364.     # Reject names that are not valid shell variable names.
  365.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  366.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  367.     fi
  368.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  369.     case "$ac_option" in
  370.       *=*) ;;
  371.       *) ac_optarg=yes ;;
  372.     esac
  373.     eval "with_${ac_package}='$ac_optarg'" ;;
  374.  
  375.   -without-* | --without-*)
  376.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  377.     # Reject names that are not valid shell variable names.
  378.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  379.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  380.     fi
  381.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  382.     eval "with_${ac_package}=no" ;;
  383.  
  384.   --x)
  385.     # Obsolete; use --with-x.
  386.     with_x=yes ;;
  387.  
  388.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  389.   | --x-incl | --x-inc | --x-in | --x-i)
  390.     ac_prev=x_includes ;;
  391.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  392.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  393.     x_includes="$ac_optarg" ;;
  394.  
  395.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  396.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  397.     ac_prev=x_libraries ;;
  398.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  399.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  400.     x_libraries="$ac_optarg" ;;
  401.  
  402.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  403.     ;;
  404.  
  405.   *)
  406.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  407.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  408.     fi
  409.     if test "x$nonopt" != xNONE; then
  410.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  411.     fi
  412.     nonopt="$ac_option"
  413.     ;;
  414.  
  415.   esac
  416. done
  417.  
  418. if test -n "$ac_prev"; then
  419.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  420. fi
  421.  
  422. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  423.  
  424. # File descriptor usage:
  425. # 0 standard input
  426. # 1 file creation
  427. # 2 errors and warnings
  428. # 3 some systems may open it to /dev/tty
  429. # 4 used on the Kubota Titan
  430. # 6 checking for... messages and results
  431. # 5 compiler messages saved in config.log
  432. if test "$silent" = yes; then
  433.   exec 6>/dev/null
  434. else
  435.   exec 6>&1
  436. fi
  437. exec 5>./config.log
  438.  
  439. echo "\
  440. This file contains any messages produced by compilers while
  441. running configure, to aid debugging if configure makes a mistake.
  442. " 1>&5
  443.  
  444. # Strip out --no-create and --no-recursion so they do not pile up.
  445. # Also quote any args containing shell metacharacters.
  446. ac_configure_args=
  447. for ac_arg
  448. do
  449.   case "$ac_arg" in
  450.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  451.   | --no-cr | --no-c) ;;
  452.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  453.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  454.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  455.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  456.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  457.   esac
  458. done
  459.  
  460. # NLS nuisances.
  461. # Only set these to C if already set.  These must not be set unconditionally
  462. # because not all systems understand e.g. LANG=C (notably SCO).
  463. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  464. # Non-C LC_CTYPE values break the ctype check.
  465. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  466. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  467. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  468. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  469.  
  470. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  471. rm -rf conftest* confdefs.h
  472. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  473. echo > confdefs.h
  474.  
  475. # A filename unique to this package, relative to the directory that
  476. # configure is in, which we can look for to find out if srcdir is correct.
  477. ac_unique_file=include/pi-cmp.h
  478.  
  479. # Find the source files, if location was not specified.
  480. if test -z "$srcdir"; then
  481.   ac_srcdir_defaulted=yes
  482.   # Try the directory containing this script, then its parent.
  483.   ac_prog=$0
  484.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  485.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  486.   srcdir=$ac_confdir
  487.   if test ! -r $srcdir/$ac_unique_file; then
  488.     srcdir=..
  489.   fi
  490. else
  491.   ac_srcdir_defaulted=no
  492. fi
  493. if test ! -r $srcdir/$ac_unique_file; then
  494.   if test "$ac_srcdir_defaulted" = yes; then
  495.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  496.   else
  497.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  498.   fi
  499. fi
  500. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  501.  
  502. # Prefer explicitly selected file to automatically selected ones.
  503. if test -z "$CONFIG_SITE"; then
  504.   if test "x$prefix" != xNONE; then
  505.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  506.   else
  507.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  508.   fi
  509. fi
  510. for ac_site_file in $CONFIG_SITE; do
  511.   if test -r "$ac_site_file"; then
  512.     echo "loading site script $ac_site_file"
  513.     . "$ac_site_file"
  514.   fi
  515. done
  516.  
  517. if test -r "$cache_file"; then
  518.   echo "loading cache $cache_file"
  519.   . $cache_file
  520. else
  521.   echo "creating cache $cache_file"
  522.   > $cache_file
  523. fi
  524.  
  525. ac_ext=c
  526. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  527. ac_cpp='$CPP $CPPFLAGS'
  528. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  529. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  530. cross_compiling=$ac_cv_prog_cc_cross
  531.  
  532. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  533.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  534.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  535.     ac_n= ac_c='
  536. ' ac_t='    '
  537.   else
  538.     ac_n=-n ac_c= ac_t=
  539.   fi
  540. else
  541.   ac_n= ac_c='\c' ac_t=
  542. fi
  543.  
  544.  
  545. ac_aux_dir=
  546. for ac_dir in scripts $srcdir/scripts; do
  547.   if test -f $ac_dir/install-sh; then
  548.     ac_aux_dir=$ac_dir
  549.     ac_install_sh="$ac_aux_dir/install-sh -c"
  550.     break
  551.   elif test -f $ac_dir/install.sh; then
  552.     ac_aux_dir=$ac_dir
  553.     ac_install_sh="$ac_aux_dir/install.sh -c"
  554.     break
  555.   fi
  556. done
  557. if test -z "$ac_aux_dir"; then
  558.   { echo "configure: error: can not find install-sh or install.sh in scripts $srcdir/scripts" 1>&2; exit 1; }
  559. fi
  560. ac_config_guess=$ac_aux_dir/config.guess
  561. ac_config_sub=$ac_aux_dir/config.sub
  562. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  563.  
  564.  
  565.  
  566.  
  567. # Make sure we can run config.sub.
  568. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  569. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  570. fi
  571.  
  572. echo $ac_n "checking host system type""... $ac_c" 1>&6
  573. echo "configure:574: checking host system type" >&5
  574.  
  575. host_alias=$host
  576. case "$host_alias" in
  577. NONE)
  578.   case $nonopt in
  579.   NONE)
  580.     if host_alias=`$ac_config_guess`; then :
  581.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  582.     fi ;;
  583.   *) host_alias=$nonopt ;;
  584.   esac ;;
  585. esac
  586.  
  587. host=`$ac_config_sub $host_alias`
  588. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  589. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  590. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  591. echo "$ac_t""$host" 1>&6
  592.  
  593.  
  594.  
  595. # Extract the first word of "gcc", so it can be a program name with args.
  596. set dummy gcc; ac_word=$2
  597. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  598. echo "configure:599: checking for $ac_word" >&5
  599. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  600.   echo $ac_n "(cached) $ac_c" 1>&6
  601. else
  602.   if test -n "$CC"; then
  603.   ac_cv_prog_CC="$CC" # Let the user override the test.
  604. else
  605.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  606.   for ac_dir in $PATH; do
  607.     test -z "$ac_dir" && ac_dir=.
  608.     if test -f $ac_dir/$ac_word; then
  609.       ac_cv_prog_CC="gcc"
  610.       break
  611.     fi
  612.   done
  613.   IFS="$ac_save_ifs"
  614. fi
  615. fi
  616. CC="$ac_cv_prog_CC"
  617. if test -n "$CC"; then
  618.   echo "$ac_t""$CC" 1>&6
  619. else
  620.   echo "$ac_t""no" 1>&6
  621. fi
  622.  
  623. if test -z "$CC"; then
  624.   # Extract the first word of "cc", so it can be a program name with args.
  625. set dummy cc; ac_word=$2
  626. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  627. echo "configure:628: checking for $ac_word" >&5
  628. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  629.   echo $ac_n "(cached) $ac_c" 1>&6
  630. else
  631.   if test -n "$CC"; then
  632.   ac_cv_prog_CC="$CC" # Let the user override the test.
  633. else
  634.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  635.   ac_prog_rejected=no
  636.   for ac_dir in $PATH; do
  637.     test -z "$ac_dir" && ac_dir=.
  638.     if test -f $ac_dir/$ac_word; then
  639.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  640.         ac_prog_rejected=yes
  641.     continue
  642.       fi
  643.       ac_cv_prog_CC="cc"
  644.       break
  645.     fi
  646.   done
  647.   IFS="$ac_save_ifs"
  648. if test $ac_prog_rejected = yes; then
  649.   # We found a bogon in the path, so make sure we never use it.
  650.   set dummy $ac_cv_prog_CC
  651.   shift
  652.   if test $# -gt 0; then
  653.     # We chose a different compiler from the bogus one.
  654.     # However, it has the same basename, so the bogon will be chosen
  655.     # first if we set CC to just the basename; use the full file name.
  656.     shift
  657.     set dummy "$ac_dir/$ac_word" "$@"
  658.     shift
  659.     ac_cv_prog_CC="$@"
  660.   fi
  661. fi
  662. fi
  663. fi
  664. CC="$ac_cv_prog_CC"
  665. if test -n "$CC"; then
  666.   echo "$ac_t""$CC" 1>&6
  667. else
  668.   echo "$ac_t""no" 1>&6
  669. fi
  670.  
  671.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  672. fi
  673.  
  674. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  675. echo "configure:676: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  676.  
  677. ac_ext=c
  678. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  679. ac_cpp='$CPP $CPPFLAGS'
  680. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  681. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  682. cross_compiling=$ac_cv_prog_cc_cross
  683.  
  684. cat > conftest.$ac_ext <<EOF
  685. #line 686 "configure"
  686. #include "confdefs.h"
  687. main(){return(0);}
  688. EOF
  689. if { (eval echo configure:690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  690.   ac_cv_prog_cc_works=yes
  691.   # If we can't run a trivial program, we are probably using a cross compiler.
  692.   if (./conftest; exit) 2>/dev/null; then
  693.     ac_cv_prog_cc_cross=no
  694.   else
  695.     ac_cv_prog_cc_cross=yes
  696.   fi
  697. else
  698.   echo "configure: failed program was:" >&5
  699.   cat conftest.$ac_ext >&5
  700.   ac_cv_prog_cc_works=no
  701. fi
  702. rm -fr conftest*
  703.  
  704. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  705. if test $ac_cv_prog_cc_works = no; then
  706.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  707. fi
  708. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  709. echo "configure:710: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  710. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  711. cross_compiling=$ac_cv_prog_cc_cross
  712.  
  713. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  714. echo "configure:715: checking whether we are using GNU C" >&5
  715. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  716.   echo $ac_n "(cached) $ac_c" 1>&6
  717. else
  718.   cat > conftest.c <<EOF
  719. #ifdef __GNUC__
  720.   yes;
  721. #endif
  722. EOF
  723. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  724.   ac_cv_prog_gcc=yes
  725. else
  726.   ac_cv_prog_gcc=no
  727. fi
  728. fi
  729.  
  730. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  731.  
  732. if test $ac_cv_prog_gcc = yes; then
  733.   GCC=yes
  734.   ac_test_CFLAGS="${CFLAGS+set}"
  735.   ac_save_CFLAGS="$CFLAGS"
  736.   CFLAGS=
  737.   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  738. echo "configure:739: checking whether ${CC-cc} accepts -g" >&5
  739. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  740.   echo $ac_n "(cached) $ac_c" 1>&6
  741. else
  742.   echo 'void f(){}' > conftest.c
  743. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  744.   ac_cv_prog_cc_g=yes
  745. else
  746.   ac_cv_prog_cc_g=no
  747. fi
  748. rm -f conftest*
  749.  
  750. fi
  751.  
  752. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  753.   if test "$ac_test_CFLAGS" = set; then
  754.     CFLAGS="$ac_save_CFLAGS"
  755.   elif test $ac_cv_prog_cc_g = yes; then
  756.     CFLAGS="-g -O2"
  757.   else
  758.     CFLAGS="-O2"
  759.   fi
  760. else
  761.   GCC=
  762.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  763. fi
  764.  
  765. # Find a good install program.  We prefer a C program (faster),
  766. # so one script is as good as another.  But avoid the broken or
  767. # incompatible versions:
  768. # SysV /etc/install, /usr/sbin/install
  769. # SunOS /usr/etc/install
  770. # IRIX /sbin/install
  771. # AIX /bin/install
  772. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  773. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  774. # ./install, which can be erroneously created by make from ./install.sh.
  775. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  776. echo "configure:777: checking for a BSD compatible install" >&5
  777. if test -z "$INSTALL"; then
  778. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  779.   echo $ac_n "(cached) $ac_c" 1>&6
  780. else
  781.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  782.   for ac_dir in $PATH; do
  783.     # Account for people who put trailing slashes in PATH elements.
  784.     case "$ac_dir/" in
  785.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  786.     *)
  787.       # OSF1 and SCO ODT 3.0 have their own names for install.
  788.       for ac_prog in ginstall installbsd scoinst install; do
  789.         if test -f $ac_dir/$ac_prog; then
  790.       if test $ac_prog = install &&
  791.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  792.         # AIX install.  It has an incompatible calling convention.
  793.         # OSF/1 installbsd also uses dspmsg, but is usable.
  794.         :
  795.       else
  796.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  797.         break 2
  798.       fi
  799.     fi
  800.       done
  801.       ;;
  802.     esac
  803.   done
  804.   IFS="$ac_save_IFS"
  805.  
  806. fi
  807.   if test "${ac_cv_path_install+set}" = set; then
  808.     INSTALL="$ac_cv_path_install"
  809.   else
  810.     # As a last resort, use the slow shell script.  We don't cache a
  811.     # path for INSTALL within a source directory, because that will
  812.     # break other packages using the cache if that directory is
  813.     # removed, or if the path is relative.
  814.     INSTALL="$ac_install_sh"
  815.   fi
  816. fi
  817. echo "$ac_t""$INSTALL" 1>&6
  818.  
  819. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  820. # It thinks the first close brace ends the variable substitution.
  821. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  822.  
  823. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  824.  
  825. # Extract the first word of "ranlib", so it can be a program name with args.
  826. set dummy ranlib; ac_word=$2
  827. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  828. echo "configure:829: checking for $ac_word" >&5
  829. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  830.   echo $ac_n "(cached) $ac_c" 1>&6
  831. else
  832.   if test -n "$RANLIB"; then
  833.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  834. else
  835.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  836.   for ac_dir in $PATH; do
  837.     test -z "$ac_dir" && ac_dir=.
  838.     if test -f $ac_dir/$ac_word; then
  839.       ac_cv_prog_RANLIB="ranlib"
  840.       break
  841.     fi
  842.   done
  843.   IFS="$ac_save_ifs"
  844.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  845. fi
  846. fi
  847. RANLIB="$ac_cv_prog_RANLIB"
  848. if test -n "$RANLIB"; then
  849.   echo "$ac_t""$RANLIB" 1>&6
  850. else
  851.   echo "$ac_t""no" 1>&6
  852. fi
  853.  
  854. # Check whether --with-gnu-ld or --without-gnu-ld was given.
  855. if test "${with_gnu_ld+set}" = set; then
  856.   withval="$with_gnu_ld"
  857.   test "$withval" = no || with_gnu_ld=yes
  858. else
  859.   with_gnu_ld=no
  860. fi
  861.  
  862. if test "$with_gnu_ld" = yes; then
  863.   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
  864. echo "configure:865: checking for GNU ld" >&5
  865. else
  866.   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
  867. echo "configure:868: checking for non-GNU ld" >&5
  868. fi
  869. if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
  870.   echo $ac_n "(cached) $ac_c" 1>&6
  871. else
  872.   case "$LD" in
  873.   /*)
  874.   ac_cv_path_LD="$LD" # Let the user override the test with a path.
  875.   ;;
  876.   *)
  877.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  878.   for ac_dir in $PATH; do
  879.     test -z "$ac_dir" && ac_dir=.
  880.     if test -f "$ac_dir/ld"; then
  881.       ac_cv_path_LD="$ac_dir/ld"
  882.       # Check to see if the program is GNU ld.  I'd rather use --version,
  883.       # but apparently some GNU ld's only accept -v.
  884.       # Break only if it was the GNU/non-GNU ld that we prefer.
  885.       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
  886.     test "$with_gnu_ld" = yes && break
  887.       else
  888.         test "$with_gnu_ld" != yes && break
  889.       fi
  890.     fi
  891.   done
  892.   IFS="$ac_save_ifs"
  893.   ;;
  894. esac
  895. fi
  896.  
  897. LD="$ac_cv_path_LD"
  898. if test -n "$LD"; then
  899.   echo "$ac_t""$LD" 1>&6
  900. else
  901.   echo "$ac_t""no" 1>&6
  902. fi
  903. test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
  904.  
  905. echo $ac_n "checking whether we are using GNU ld""... $ac_c" 1>&6
  906. echo "configure:907: checking whether we are using GNU ld" >&5
  907. if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
  908.   echo $ac_n "(cached) $ac_c" 1>&6
  909. else
  910.   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
  911. if $LD -v 2>&1 </dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
  912.   ac_cv_prog_gnu_ld=yes
  913. else
  914.   ac_cv_prog_gnu_ld=no
  915. fi
  916. fi
  917.  
  918. echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
  919.  
  920.  
  921. echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
  922. echo "configure:923: checking whether ln -s works" >&5
  923. if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  924.   echo $ac_n "(cached) $ac_c" 1>&6
  925. else
  926.   rm -f conftestdata
  927. if ln -s X conftestdata 2>/dev/null
  928. then
  929.   rm -f conftestdata
  930.   ac_cv_prog_LN_S="ln -s"
  931. else
  932.   ac_cv_prog_LN_S=ln
  933. fi
  934. fi
  935. LN_S="$ac_cv_prog_LN_S"
  936. if test "$ac_cv_prog_LN_S" = "ln -s"; then
  937.   echo "$ac_t""yes" 1>&6
  938. else
  939.   echo "$ac_t""no" 1>&6
  940. fi
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948. # Always use our own libtool.
  949. LIBTOOL='$(top_builddir)/libtool'
  950.  
  951.  
  952. # Check whether --enable-shared or --disable-shared was given.
  953. if test "${enable_shared+set}" = set; then
  954.   enableval="$enable_shared"
  955.   test "$enableval" = no && libtool_shared=" --disable-shared"
  956. else
  957.   libtool_shared=
  958. fi
  959.  
  960.  
  961. # Check whether --enable-static or --disable-static was given.
  962. if test "${enable_static+set}" = set; then
  963.   enableval="$enable_static"
  964.   test "$enableval" = no && libtool_static=" --disable-static"
  965. else
  966.   libtool_static=
  967. fi
  968.  
  969.  
  970. libtool_flags="$libtool_shared$libtool_static"
  971. test "$silent" = yes && libtool_flags="$libtool_flags --silent"
  972. test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
  973. test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
  974.  
  975. # Some flags need to be propagated to the compiler or linker for good
  976. # libtool support.
  977. case "$host" in
  978. *-*-irix6*)
  979.   for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do
  980.     if echo " $CC $CFLAGS " | egrep -e "[     ]$f[     ]" > /dev/null; then
  981.       LD="${LD-ld} $f"
  982.     fi
  983.   done
  984.   ;;
  985.  
  986. *-*-sco3.2v5*)
  987.   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  988.   CFLAGS="$CFLAGS -belf"
  989.   ;;
  990. esac
  991.  
  992. # Actually configure libtool.  ac_aux_dir is where install-sh is found.
  993. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
  994. LD="$LD" RANLIB="$RANLIB" LN_S="$LN_S" \
  995. ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
  996. $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
  997. || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
  998.  
  999. # Extract the first word of "ranlib", so it can be a program name with args.
  1000. set dummy ranlib; ac_word=$2
  1001. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1002. echo "configure:1003: checking for $ac_word" >&5
  1003. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  1004.   echo $ac_n "(cached) $ac_c" 1>&6
  1005. else
  1006.   if test -n "$RANLIB"; then
  1007.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1008. else
  1009.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1010.   for ac_dir in $PATH; do
  1011.     test -z "$ac_dir" && ac_dir=.
  1012.     if test -f $ac_dir/$ac_word; then
  1013.       ac_cv_prog_RANLIB="ranlib"
  1014.       break
  1015.     fi
  1016.   done
  1017.   IFS="$ac_save_ifs"
  1018.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  1019. fi
  1020. fi
  1021. RANLIB="$ac_cv_prog_RANLIB"
  1022. if test -n "$RANLIB"; then
  1023.   echo "$ac_t""$RANLIB" 1>&6
  1024. else
  1025.   echo "$ac_t""no" 1>&6
  1026. fi
  1027.  
  1028. for ac_prog in 'bison -y' byacc
  1029. do
  1030. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1031. set dummy $ac_prog; ac_word=$2
  1032. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1033. echo "configure:1034: checking for $ac_word" >&5
  1034. if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
  1035.   echo $ac_n "(cached) $ac_c" 1>&6
  1036. else
  1037.   if test -n "$YACC"; then
  1038.   ac_cv_prog_YACC="$YACC" # Let the user override the test.
  1039. else
  1040.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1041.   for ac_dir in $PATH; do
  1042.     test -z "$ac_dir" && ac_dir=.
  1043.     if test -f $ac_dir/$ac_word; then
  1044.       ac_cv_prog_YACC="$ac_prog"
  1045.       break
  1046.     fi
  1047.   done
  1048.   IFS="$ac_save_ifs"
  1049. fi
  1050. fi
  1051. YACC="$ac_cv_prog_YACC"
  1052. if test -n "$YACC"; then
  1053.   echo "$ac_t""$YACC" 1>&6
  1054. else
  1055.   echo "$ac_t""no" 1>&6
  1056. fi
  1057.  
  1058. test -n "$YACC" && break
  1059. done
  1060. test -n "$YACC" || YACC="yacc"
  1061.  
  1062.  
  1063. WITHTCL="WITHOUTTCL"
  1064. WITHCXX="WITHOUTCXX"
  1065. WITHTK="WITHOUTTK"
  1066. WITHPERL5="WITHOUTPERL5"
  1067. WITHPYTHON="WITHOUTPYTHON"
  1068. WITHJAVA="WITHOUTJAVA"
  1069.  
  1070. # Check whether --with-cpp or --without-cpp was given.
  1071. if test "${with_cpp+set}" = set; then
  1072.   withval="$with_cpp"
  1073.   :
  1074. fi
  1075.  
  1076.  
  1077. if test "x$with_cpp" = "xno"; then
  1078.     CXX=
  1079.     ac_cv_prog_cxx_works=no
  1080. else
  1081.  
  1082. if test "x$with_cpp" = "xyes"; then
  1083.     with_cpp=""
  1084. fi
  1085.  
  1086. if test "x$with_cpp" = "x"; then
  1087.     for ac_prog in $CCC c++ g++ gcc CC cxx cc++
  1088. do
  1089. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1090. set dummy $ac_prog; ac_word=$2
  1091. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1092. echo "configure:1093: checking for $ac_word" >&5
  1093. if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  1094.   echo $ac_n "(cached) $ac_c" 1>&6
  1095. else
  1096.   if test -n "$CXX"; then
  1097.   ac_cv_prog_CXX="$CXX" # Let the user override the test.
  1098. else
  1099.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1100.   for ac_dir in $PATH; do
  1101.     test -z "$ac_dir" && ac_dir=.
  1102.     if test -f $ac_dir/$ac_word; then
  1103.       ac_cv_prog_CXX="$ac_prog"
  1104.       break
  1105.     fi
  1106.   done
  1107.   IFS="$ac_save_ifs"
  1108. fi
  1109. fi
  1110. CXX="$ac_cv_prog_CXX"
  1111. if test -n "$CXX"; then
  1112.   echo "$ac_t""$CXX" 1>&6
  1113. else
  1114.   echo "$ac_t""no" 1>&6
  1115. fi
  1116.  
  1117. test -n "$CXX" && break
  1118. done
  1119. test -n "$CXX" || CXX="gcc"
  1120.  
  1121. else
  1122.     CXX=$with_cpp
  1123. fi
  1124.  
  1125.  
  1126. ac_ext=C
  1127. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1128. ac_cpp='$CXXCPP $CPPFLAGS'
  1129. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1130. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1131. cross_compiling=$ac_cv_prog_cxx_cross
  1132.  
  1133. echo $ac_n "checking whether C++ compiler ($CXX $CXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  1134. echo "configure:1135: checking whether C++ compiler ($CXX $CXFLAGS $LDFLAGS) works" >&5
  1135. if eval "test \"`echo '$''{'ac_cv_prog_cxx_works'+set}'`\" = set"; then
  1136.   echo $ac_n "(cached) $ac_c" 1>&6
  1137. else
  1138.   cat > conftest.$ac_ext <<EOF
  1139. #line 1140 "configure"
  1140. #include "confdefs.h"
  1141. #include <stdio.h>
  1142. int main() {
  1143. class a { public: int b; a::a(void); };
  1144. a b; 
  1145. ; return 0; }
  1146. EOF
  1147. if { (eval echo configure:1148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1148.   rm -rf conftest*
  1149.   ac_cv_prog_cxx_works=yes
  1150. else
  1151.   echo "configure: failed program was:" >&5
  1152.   cat conftest.$ac_ext >&5
  1153.   rm -rf conftest*
  1154.   ac_cv_prog_cxx_works=no
  1155. fi
  1156. rm -f conftest*
  1157. fi
  1158.  
  1159. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  1160. ac_ext=c
  1161. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1162. ac_cpp='$CPP $CPPFLAGS'
  1163. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1164. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1165. cross_compiling=$ac_cv_prog_cc_cross
  1166.  
  1167.  
  1168. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  1169. echo "configure:1170: checking whether we are using GNU C++" >&5
  1170. if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  1171.   echo $ac_n "(cached) $ac_c" 1>&6
  1172. else
  1173.   cat > conftest.C <<EOF
  1174. #ifdef __GNUC__
  1175.   yes;
  1176. #endif
  1177. EOF
  1178. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  1179.   ac_cv_prog_gxx=yes
  1180. else
  1181.   ac_cv_prog_gxx=no
  1182. fi
  1183. fi
  1184.  
  1185. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  1186.  
  1187. if test $ac_cv_prog_gxx = yes; then
  1188.   GXX=yes
  1189.   ac_test_CXXFLAGS="${CXXFLAGS+set}"
  1190.   ac_save_CXXFLAGS="$CXXFLAGS"
  1191.   CXXFLAGS=
  1192.   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  1193. echo "configure:1194: checking whether ${CXX-g++} accepts -g" >&5
  1194. if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  1195.   echo $ac_n "(cached) $ac_c" 1>&6
  1196. else
  1197.   echo 'void f(){}' > conftest.cc
  1198. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  1199.   ac_cv_prog_cxx_g=yes
  1200. else
  1201.   ac_cv_prog_cxx_g=no
  1202. fi
  1203. rm -f conftest*
  1204.  
  1205. fi
  1206.  
  1207. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  1208.   if test "$ac_test_CXXFLAGS" = set; then
  1209.     CXXFLAGS="$ac_save_CXXFLAGS"
  1210.   elif test $ac_cv_prog_cxx_g = yes; then
  1211.     CXXFLAGS="-g -O2"
  1212.   else
  1213.     CXXFLAGS="-O2"
  1214.   fi
  1215. else
  1216.   GXX=
  1217.   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
  1218. fi
  1219.  
  1220. fi
  1221.  
  1222. ccexecs=''
  1223. cclib=''
  1224. libcclib=''
  1225. SUBMAKE_COMM='cd $(top_builddir)/libsock ; $(MAKE) '
  1226. SUBMAKE_COMM_CC='-true'
  1227. EXT=''
  1228. CXXLIBS=''
  1229. if test $ac_cv_prog_cxx_works = yes; then
  1230.   ccexecs='$(CCEXECS)'
  1231.   cclib='libpicc.a'
  1232.   libcclib='libcc/libpicc.a'
  1233.   SUBMAKE_COMM_CC='cd $(top_builddir)/libcc ; $(MAKE) '
  1234.   WITHCXX='WITHCXX'
  1235. else
  1236.   CXX=''
  1237.   CXXFLAGS=''
  1238. fi
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249. case "$host" in
  1250.     *sunos*)
  1251.         case "$LD" in 
  1252.             */ucb/*) LIBS="-L/usr/ucblib -R/usr/ucblib $LIBS" ;;
  1253.         esac ;;
  1254. esac        
  1255.  
  1256.  
  1257.  
  1258. if test $ac_cv_prog_cxx_works = yes; then
  1259.   
  1260.   ac_ext=C
  1261. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1262. ac_cpp='$CXXCPP $CPPFLAGS'
  1263. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1264. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1265. cross_compiling=$ac_cv_prog_cxx_cross
  1266.  
  1267.   if test $ac_cv_prog_gxx = yes; then
  1268.     echo $ac_n "checking for main in -lg++""... $ac_c" 1>&6
  1269. echo "configure:1270: checking for main in -lg++" >&5
  1270. ac_lib_var=`echo g++'_'main | sed 'y%./+-%__p_%'`
  1271. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1272.   echo $ac_n "(cached) $ac_c" 1>&6
  1273. else
  1274.   ac_save_LIBS="$LIBS"
  1275. LIBS="-lg++  $LIBS"
  1276. cat > conftest.$ac_ext <<EOF
  1277. #line 1278 "configure"
  1278. #include "confdefs.h"
  1279.  
  1280. int main() {
  1281. main()
  1282. ; return 0; }
  1283. EOF
  1284. if { (eval echo configure:1285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1285.   rm -rf conftest*
  1286.   eval "ac_cv_lib_$ac_lib_var=yes"
  1287. else
  1288.   echo "configure: failed program was:" >&5
  1289.   cat conftest.$ac_ext >&5
  1290.   rm -rf conftest*
  1291.   eval "ac_cv_lib_$ac_lib_var=no"
  1292. fi
  1293. rm -f conftest*
  1294. LIBS="$ac_save_LIBS"
  1295.  
  1296. fi
  1297. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1298.   echo "$ac_t""yes" 1>&6
  1299.   CXXLIBS="$CXXLIBS -lg++"
  1300. else
  1301.   echo "$ac_t""no" 1>&6
  1302. fi
  1303.  
  1304.   fi
  1305.   ac_ext=c
  1306. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1307. ac_cpp='$CPP $CPPFLAGS'
  1308. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1309. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1310. cross_compiling=$ac_cv_prog_cc_cross
  1311.  
  1312. fi
  1313. echo $ac_n "checking for ldexp in -lm""... $ac_c" 1>&6
  1314. echo "configure:1315: checking for ldexp in -lm" >&5
  1315. ac_lib_var=`echo m'_'ldexp | sed 'y%./+-%__p_%'`
  1316. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1317.   echo $ac_n "(cached) $ac_c" 1>&6
  1318. else
  1319.   ac_save_LIBS="$LIBS"
  1320. LIBS="-lm  $LIBS"
  1321. cat > conftest.$ac_ext <<EOF
  1322. #line 1323 "configure"
  1323. #include "confdefs.h"
  1324. /* Override any gcc2 internal prototype to avoid an error.  */
  1325. /* We use char because int might match the return type of a gcc2
  1326.     builtin and then its argument prototype would still apply.  */
  1327. char ldexp();
  1328.  
  1329. int main() {
  1330. ldexp()
  1331. ; return 0; }
  1332. EOF
  1333. if { (eval echo configure:1334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1334.   rm -rf conftest*
  1335.   eval "ac_cv_lib_$ac_lib_var=yes"
  1336. else
  1337.   echo "configure: failed program was:" >&5
  1338.   cat conftest.$ac_ext >&5
  1339.   rm -rf conftest*
  1340.   eval "ac_cv_lib_$ac_lib_var=no"
  1341. fi
  1342. rm -f conftest*
  1343. LIBS="$ac_save_LIBS"
  1344.  
  1345. fi
  1346. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1347.   echo "$ac_t""yes" 1>&6
  1348.   LIBS="$LIBS -lm"
  1349. else
  1350.   echo "$ac_t""no" 1>&6
  1351. fi
  1352.  
  1353. echo $ac_n "checking for alloca in -lPW""... $ac_c" 1>&6
  1354. echo "configure:1355: checking for alloca in -lPW" >&5
  1355. ac_lib_var=`echo PW'_'alloca | sed 'y%./+-%__p_%'`
  1356. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1357.   echo $ac_n "(cached) $ac_c" 1>&6
  1358. else
  1359.   ac_save_LIBS="$LIBS"
  1360. LIBS="-lPW  $LIBS"
  1361. cat > conftest.$ac_ext <<EOF
  1362. #line 1363 "configure"
  1363. #include "confdefs.h"
  1364. /* Override any gcc2 internal prototype to avoid an error.  */
  1365. /* We use char because int might match the return type of a gcc2
  1366.     builtin and then its argument prototype would still apply.  */
  1367. char alloca();
  1368.  
  1369. int main() {
  1370. alloca()
  1371. ; return 0; }
  1372. EOF
  1373. if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1374.   rm -rf conftest*
  1375.   eval "ac_cv_lib_$ac_lib_var=yes"
  1376. else
  1377.   echo "configure: failed program was:" >&5
  1378.   cat conftest.$ac_ext >&5
  1379.   rm -rf conftest*
  1380.   eval "ac_cv_lib_$ac_lib_var=no"
  1381. fi
  1382. rm -f conftest*
  1383. LIBS="$ac_save_LIBS"
  1384.  
  1385. fi
  1386. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1387.   echo "$ac_t""yes" 1>&6
  1388.   LIBS="$LIBS -lPW"
  1389. else
  1390.   echo "$ac_t""no" 1>&6
  1391. fi
  1392.  
  1393.  
  1394. # Check whether --with-readline21 or --without-readline21 was given.
  1395. if test "${with_readline21+set}" = set; then
  1396.   withval="$with_readline21"
  1397.   :
  1398. fi
  1399.  
  1400. # Check whether --with-readline20 or --without-readline20 was given.
  1401. if test "${with_readline20+set}" = set; then
  1402.   withval="$with_readline20"
  1403.   :
  1404. fi
  1405.  
  1406.  
  1407. ac_save_LIBS="$LIBS"
  1408. LIBS="$LIBS -lreadline"
  1409. cat > conftest.$ac_ext <<EOF
  1410. #line 1411 "configure"
  1411. #include "confdefs.h"
  1412.  
  1413. int main() {
  1414. (void)readline(0);
  1415. ; return 0; }
  1416. EOF
  1417. if { (eval echo configure:1418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1418.   rm -rf conftest*
  1419.   RLLIBS="-lreadline"
  1420. else
  1421.   echo "configure: failed program was:" >&5
  1422.   cat conftest.$ac_ext >&5
  1423.   rm -rf conftest*
  1424.   LIBS="$LIBS -ltermcap"
  1425. cat > conftest.$ac_ext <<EOF
  1426. #line 1427 "configure"
  1427. #include "confdefs.h"
  1428.  
  1429. int main() {
  1430. (void)readline(0);
  1431. ; return 0; }
  1432. EOF
  1433. if { (eval echo configure:1434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1434.   rm -rf conftest*
  1435.   RLLIBS="-lreadline -ltermcap"
  1436. else
  1437.   echo "configure: failed program was:" >&5
  1438.   cat conftest.$ac_ext >&5
  1439. fi
  1440. rm -f conftest*
  1441. fi
  1442. rm -f conftest*
  1443. LIBS="$ac_save_LIBS"
  1444.  
  1445. echo $ac_n "checking for readline""... $ac_c" 1>&6
  1446. echo "configure:1447: checking for readline" >&5
  1447. if test "x$with_readline21" = "x" || test "x$with_readline21" = "xyes"; then
  1448.     ac_save_LIBS="$LIBS"
  1449.     LIBS="$LIBS $RLLIBS"
  1450.     cat > conftest.$ac_ext <<EOF
  1451. #line 1452 "configure"
  1452. #include "confdefs.h"
  1453. #include <stdio.h>
  1454.     #include <readline/readline.h>
  1455. int main() {
  1456. rl_callback_read_char();
  1457. ; return 0; }
  1458. EOF
  1459. if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1460.   rm -rf conftest*
  1461.   RLDEFS="-DREADLINE_2_1"
  1462.         with_readline20='no'
  1463.         echo "$ac_t""2.1" 1>&6
  1464. else
  1465.   echo "configure: failed program was:" >&5
  1466.   cat conftest.$ac_ext >&5
  1467. fi
  1468. rm -f conftest*
  1469.     LIBS="$ac_save_LIBS"
  1470. fi
  1471. if test "x$with_readline20" = "x" || test "x$with_readline20" = "xyes"; then
  1472.     ac_save_LIBS="$LIBS"
  1473.     LIBS="$LIBS $RLLIBS"
  1474.     cat > conftest.$ac_ext <<EOF
  1475. #line 1476 "configure"
  1476. #include "confdefs.h"
  1477. #include <stdio.h>
  1478.     #include <readline/readline.h>
  1479. int main() {
  1480.  
  1481. extern void rl_deprep_terminal(void);
  1482. extern int rl_getc(FILE * stream);
  1483. extern void rl_gather_tyi(void);
  1484.  
  1485. rl_deprep_terminal();
  1486. (void)rl_getc(stdin);
  1487. rl_gather_tyi();
  1488. ; return 0; }
  1489. EOF
  1490. if { (eval echo configure:1491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1491.   rm -rf conftest*
  1492.   RLDEFS="-DREADLINE_2_0"; echo "$ac_t""2.0" 1>&6
  1493. else
  1494.   echo "configure: failed program was:" >&5
  1495.   cat conftest.$ac_ext >&5
  1496. fi
  1497. rm -f conftest*
  1498.     LIBS="$ac_save_LIBS"
  1499. fi
  1500.  
  1501. if test "x$RLDEFS" = "x"; then
  1502.     echo "$ac_t""none" 1>&6
  1503. fi
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1510. echo "configure:1511: checking how to run the C preprocessor" >&5
  1511. # On Suns, sometimes $CPP names a directory.
  1512. if test -n "$CPP" && test -d "$CPP"; then
  1513.   CPP=
  1514. fi
  1515. if test -z "$CPP"; then
  1516. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1517.   echo $ac_n "(cached) $ac_c" 1>&6
  1518. else
  1519.     # This must be in double quotes, not single quotes, because CPP may get
  1520.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1521.   CPP="${CC-cc} -E"
  1522.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1523.   # not just through cpp.
  1524.   cat > conftest.$ac_ext <<EOF
  1525. #line 1526 "configure"
  1526. #include "confdefs.h"
  1527. #include <assert.h>
  1528. Syntax Error
  1529. EOF
  1530. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1531. { (eval echo configure:1532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1532. ac_err=`grep -v '^ *+' conftest.out`
  1533. if test -z "$ac_err"; then
  1534.   :
  1535. else
  1536.   echo "$ac_err" >&5
  1537.   echo "configure: failed program was:" >&5
  1538.   cat conftest.$ac_ext >&5
  1539.   rm -rf conftest*
  1540.   CPP="${CC-cc} -E -traditional-cpp"
  1541.   cat > conftest.$ac_ext <<EOF
  1542. #line 1543 "configure"
  1543. #include "confdefs.h"
  1544. #include <assert.h>
  1545. Syntax Error
  1546. EOF
  1547. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1548. { (eval echo configure:1549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1549. ac_err=`grep -v '^ *+' conftest.out`
  1550. if test -z "$ac_err"; then
  1551.   :
  1552. else
  1553.   echo "$ac_err" >&5
  1554.   echo "configure: failed program was:" >&5
  1555.   cat conftest.$ac_ext >&5
  1556.   rm -rf conftest*
  1557.   CPP=/lib/cpp
  1558. fi
  1559. rm -f conftest*
  1560. fi
  1561. rm -f conftest*
  1562.   ac_cv_prog_CPP="$CPP"
  1563. fi
  1564.   CPP="$ac_cv_prog_CPP"
  1565. else
  1566.   ac_cv_prog_CPP="$CPP"
  1567. fi
  1568. echo "$ac_t""$CPP" 1>&6
  1569.  
  1570. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1571. echo "configure:1572: checking for ANSI C header files" >&5
  1572. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1573.   echo $ac_n "(cached) $ac_c" 1>&6
  1574. else
  1575.   cat > conftest.$ac_ext <<EOF
  1576. #line 1577 "configure"
  1577. #include "confdefs.h"
  1578. #include <stdlib.h>
  1579. #include <stdarg.h>
  1580. #include <string.h>
  1581. #include <float.h>
  1582. EOF
  1583. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1584. { (eval echo configure:1585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1585. ac_err=`grep -v '^ *+' conftest.out`
  1586. if test -z "$ac_err"; then
  1587.   rm -rf conftest*
  1588.   ac_cv_header_stdc=yes
  1589. else
  1590.   echo "$ac_err" >&5
  1591.   echo "configure: failed program was:" >&5
  1592.   cat conftest.$ac_ext >&5
  1593.   rm -rf conftest*
  1594.   ac_cv_header_stdc=no
  1595. fi
  1596. rm -f conftest*
  1597.  
  1598. if test $ac_cv_header_stdc = yes; then
  1599.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1600. cat > conftest.$ac_ext <<EOF
  1601. #line 1602 "configure"
  1602. #include "confdefs.h"
  1603. #include <string.h>
  1604. EOF
  1605. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1606.   egrep "memchr" >/dev/null 2>&1; then
  1607.   :
  1608. else
  1609.   rm -rf conftest*
  1610.   ac_cv_header_stdc=no
  1611. fi
  1612. rm -f conftest*
  1613.  
  1614. fi
  1615.  
  1616. if test $ac_cv_header_stdc = yes; then
  1617.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1618. cat > conftest.$ac_ext <<EOF
  1619. #line 1620 "configure"
  1620. #include "confdefs.h"
  1621. #include <stdlib.h>
  1622. EOF
  1623. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1624.   egrep "free" >/dev/null 2>&1; then
  1625.   :
  1626. else
  1627.   rm -rf conftest*
  1628.   ac_cv_header_stdc=no
  1629. fi
  1630. rm -f conftest*
  1631.  
  1632. fi
  1633.  
  1634. if test $ac_cv_header_stdc = yes; then
  1635.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1636. if test "$cross_compiling" = yes; then
  1637.   :
  1638. else
  1639.   cat > conftest.$ac_ext <<EOF
  1640. #line 1641 "configure"
  1641. #include "confdefs.h"
  1642. #include <ctype.h>
  1643. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1644. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1645. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1646. int main () { int i; for (i = 0; i < 256; i++)
  1647. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1648. exit (0); }
  1649.  
  1650. EOF
  1651. if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1652. then
  1653.   :
  1654. else
  1655.   echo "configure: failed program was:" >&5
  1656.   cat conftest.$ac_ext >&5
  1657.   rm -fr conftest*
  1658.   ac_cv_header_stdc=no
  1659. fi
  1660. rm -fr conftest*
  1661. fi
  1662.  
  1663. fi
  1664. fi
  1665.  
  1666. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1667. if test $ac_cv_header_stdc = yes; then
  1668.   cat >> confdefs.h <<\EOF
  1669. #define STDC_HEADERS 1
  1670. EOF
  1671.  
  1672. fi
  1673.  
  1674. for ac_hdr in fcntl.h malloc.h sys/ioctl.h sys/time.h sys/ioctl_compat.h memory.h string.h strings.h unistd.h stdlib.h netinet/in.h dirent.h sys/ndir.h sys/dir.h ndir.h sys/select.h sockio.h netdb.h sys/utsname.h
  1675. do
  1676. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1677. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1678. echo "configure:1679: checking for $ac_hdr" >&5
  1679. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1680.   echo $ac_n "(cached) $ac_c" 1>&6
  1681. else
  1682.   cat > conftest.$ac_ext <<EOF
  1683. #line 1684 "configure"
  1684. #include "confdefs.h"
  1685. #include <$ac_hdr>
  1686. EOF
  1687. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1688. { (eval echo configure:1689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1689. ac_err=`grep -v '^ *+' conftest.out`
  1690. if test -z "$ac_err"; then
  1691.   rm -rf conftest*
  1692.   eval "ac_cv_header_$ac_safe=yes"
  1693. else
  1694.   echo "$ac_err" >&5
  1695.   echo "configure: failed program was:" >&5
  1696.   cat conftest.$ac_ext >&5
  1697.   rm -rf conftest*
  1698.   eval "ac_cv_header_$ac_safe=no"
  1699. fi
  1700. rm -f conftest*
  1701. fi
  1702. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1703.   echo "$ac_t""yes" 1>&6
  1704.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1705.   cat >> confdefs.h <<EOF
  1706. #define $ac_tr_hdr 1
  1707. EOF
  1708.  
  1709. else
  1710.   echo "$ac_t""no" 1>&6
  1711. fi
  1712. done
  1713.  
  1714.  
  1715. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1716. echo "configure:1717: checking for working const" >&5
  1717. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1718.   echo $ac_n "(cached) $ac_c" 1>&6
  1719. else
  1720.   cat > conftest.$ac_ext <<EOF
  1721. #line 1722 "configure"
  1722. #include "confdefs.h"
  1723.  
  1724. int main() {
  1725.  
  1726. /* Ultrix mips cc rejects this.  */
  1727. typedef int charset[2]; const charset x;
  1728. /* SunOS 4.1.1 cc rejects this.  */
  1729. char const *const *ccp;
  1730. char **p;
  1731. /* NEC SVR4.0.2 mips cc rejects this.  */
  1732. struct point {int x, y;};
  1733. static struct point const zero = {0,0};
  1734. /* AIX XL C 1.02.0.0 rejects this.
  1735.    It does not let you subtract one const X* pointer from another in an arm
  1736.    of an if-expression whose if-part is not a constant expression */
  1737. const char *g = "string";
  1738. ccp = &g + (g ? g-g : 0);
  1739. /* HPUX 7.0 cc rejects these. */
  1740. ++ccp;
  1741. p = (char**) ccp;
  1742. ccp = (char const *const *) p;
  1743. { /* SCO 3.2v4 cc rejects this.  */
  1744.   char *t;
  1745.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1746.  
  1747.   *t++ = 0;
  1748. }
  1749. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1750.   int x[] = {25, 17};
  1751.   const int *foo = &x[0];
  1752.   ++foo;
  1753. }
  1754. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1755.   typedef const int *iptr;
  1756.   iptr p = 0;
  1757.   ++p;
  1758. }
  1759. { /* AIX XL C 1.02.0.0 rejects this saying
  1760.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1761.   struct s { int j; const int *ap[3]; };
  1762.   struct s *b; b->j = 5;
  1763. }
  1764. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1765.   const int foo = 10;
  1766. }
  1767.  
  1768. ; return 0; }
  1769. EOF
  1770. if { (eval echo configure:1771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1771.   rm -rf conftest*
  1772.   ac_cv_c_const=yes
  1773. else
  1774.   echo "configure: failed program was:" >&5
  1775.   cat conftest.$ac_ext >&5
  1776.   rm -rf conftest*
  1777.   ac_cv_c_const=no
  1778. fi
  1779. rm -f conftest*
  1780. fi
  1781.  
  1782. echo "$ac_t""$ac_cv_c_const" 1>&6
  1783. if test $ac_cv_c_const = no; then
  1784.   cat >> confdefs.h <<\EOF
  1785. #define const 
  1786. EOF
  1787.  
  1788. fi
  1789.  
  1790. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  1791. echo "configure:1792: checking whether time.h and sys/time.h may both be included" >&5
  1792. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  1793.   echo $ac_n "(cached) $ac_c" 1>&6
  1794. else
  1795.   cat > conftest.$ac_ext <<EOF
  1796. #line 1797 "configure"
  1797. #include "confdefs.h"
  1798. #include <sys/types.h>
  1799. #include <sys/time.h>
  1800. #include <time.h>
  1801. int main() {
  1802. struct tm *tp;
  1803. ; return 0; }
  1804. EOF
  1805. if { (eval echo configure:1806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1806.   rm -rf conftest*
  1807.   ac_cv_header_time=yes
  1808. else
  1809.   echo "configure: failed program was:" >&5
  1810.   cat conftest.$ac_ext >&5
  1811.   rm -rf conftest*
  1812.   ac_cv_header_time=no
  1813. fi
  1814. rm -f conftest*
  1815. fi
  1816.  
  1817. echo "$ac_t""$ac_cv_header_time" 1>&6
  1818. if test $ac_cv_header_time = yes; then
  1819.   cat >> confdefs.h <<\EOF
  1820. #define TIME_WITH_SYS_TIME 1
  1821. EOF
  1822.  
  1823. fi
  1824.  
  1825. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  1826. echo "configure:1827: checking whether struct tm is in sys/time.h or time.h" >&5
  1827. if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  1828.   echo $ac_n "(cached) $ac_c" 1>&6
  1829. else
  1830.   cat > conftest.$ac_ext <<EOF
  1831. #line 1832 "configure"
  1832. #include "confdefs.h"
  1833. #include <sys/types.h>
  1834. #include <time.h>
  1835. int main() {
  1836. struct tm *tp; tp->tm_sec;
  1837. ; return 0; }
  1838. EOF
  1839. if { (eval echo configure:1840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1840.   rm -rf conftest*
  1841.   ac_cv_struct_tm=time.h
  1842. else
  1843.   echo "configure: failed program was:" >&5
  1844.   cat conftest.$ac_ext >&5
  1845.   rm -rf conftest*
  1846.   ac_cv_struct_tm=sys/time.h
  1847. fi
  1848. rm -f conftest*
  1849. fi
  1850.  
  1851. echo "$ac_t""$ac_cv_struct_tm" 1>&6
  1852. if test $ac_cv_struct_tm = sys/time.h; then
  1853.   cat >> confdefs.h <<\EOF
  1854. #define TM_IN_SYS_TIME 1
  1855. EOF
  1856.  
  1857. fi
  1858.  
  1859.  
  1860. tcl_checkBoth=0
  1861. echo $ac_n "checking for connect""... $ac_c" 1>&6
  1862. echo "configure:1863: checking for connect" >&5
  1863. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  1864.   echo $ac_n "(cached) $ac_c" 1>&6
  1865. else
  1866.   cat > conftest.$ac_ext <<EOF
  1867. #line 1868 "configure"
  1868. #include "confdefs.h"
  1869. /* System header to define __stub macros and hopefully few prototypes,
  1870.     which can conflict with char connect(); below.  */
  1871. #include <assert.h>
  1872. /* Override any gcc2 internal prototype to avoid an error.  */
  1873. /* We use char because int might match the return type of a gcc2
  1874.     builtin and then its argument prototype would still apply.  */
  1875. char connect();
  1876.  
  1877. int main() {
  1878.  
  1879. /* The GNU C library defines this for functions which it implements
  1880.     to always fail with ENOSYS.  Some functions are actually named
  1881.     something starting with __ and the normal name is an alias.  */
  1882. #if defined (__stub_connect) || defined (__stub___connect)
  1883. choke me
  1884. #else
  1885. connect();
  1886. #endif
  1887.  
  1888. ; return 0; }
  1889. EOF
  1890. if { (eval echo configure:1891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1891.   rm -rf conftest*
  1892.   eval "ac_cv_func_connect=yes"
  1893. else
  1894.   echo "configure: failed program was:" >&5
  1895.   cat conftest.$ac_ext >&5
  1896.   rm -rf conftest*
  1897.   eval "ac_cv_func_connect=no"
  1898. fi
  1899. rm -f conftest*
  1900. fi
  1901.  
  1902. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  1903.   echo "$ac_t""yes" 1>&6
  1904.   tcl_checkSocket=0
  1905. else
  1906.   echo "$ac_t""no" 1>&6
  1907. tcl_checkSocket=1
  1908. fi
  1909.  
  1910. if test "$tcl_checkSocket" = 1; then
  1911.     echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
  1912. echo "configure:1913: checking for main in -lsocket" >&5
  1913. ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
  1914. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1915.   echo $ac_n "(cached) $ac_c" 1>&6
  1916. else
  1917.   ac_save_LIBS="$LIBS"
  1918. LIBS="-lsocket  $LIBS"
  1919. cat > conftest.$ac_ext <<EOF
  1920. #line 1921 "configure"
  1921. #include "confdefs.h"
  1922.  
  1923. int main() {
  1924. main()
  1925. ; return 0; }
  1926. EOF
  1927. if { (eval echo configure:1928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1928.   rm -rf conftest*
  1929.   eval "ac_cv_lib_$ac_lib_var=yes"
  1930. else
  1931.   echo "configure: failed program was:" >&5
  1932.   cat conftest.$ac_ext >&5
  1933.   rm -rf conftest*
  1934.   eval "ac_cv_lib_$ac_lib_var=no"
  1935. fi
  1936. rm -f conftest*
  1937. LIBS="$ac_save_LIBS"
  1938.  
  1939. fi
  1940. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1941.   echo "$ac_t""yes" 1>&6
  1942.   LIBS="$LIBS -lsocket"
  1943. else
  1944.   echo "$ac_t""no" 1>&6
  1945. tcl_checkBoth=1
  1946. fi
  1947.  
  1948. fi
  1949. if test "$tcl_checkBoth" = 1; then
  1950.     tk_oldLibs=$LIBS
  1951.     LIBS="$LIBS -lsocket -lnsl"
  1952.     echo $ac_n "checking for accept""... $ac_c" 1>&6
  1953. echo "configure:1954: checking for accept" >&5
  1954. if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
  1955.   echo $ac_n "(cached) $ac_c" 1>&6
  1956. else
  1957.   cat > conftest.$ac_ext <<EOF
  1958. #line 1959 "configure"
  1959. #include "confdefs.h"
  1960. /* System header to define __stub macros and hopefully few prototypes,
  1961.     which can conflict with char accept(); below.  */
  1962. #include <assert.h>
  1963. /* Override any gcc2 internal prototype to avoid an error.  */
  1964. /* We use char because int might match the return type of a gcc2
  1965.     builtin and then its argument prototype would still apply.  */
  1966. char accept();
  1967.  
  1968. int main() {
  1969.  
  1970. /* The GNU C library defines this for functions which it implements
  1971.     to always fail with ENOSYS.  Some functions are actually named
  1972.     something starting with __ and the normal name is an alias.  */
  1973. #if defined (__stub_accept) || defined (__stub___accept)
  1974. choke me
  1975. #else
  1976. accept();
  1977. #endif
  1978.  
  1979. ; return 0; }
  1980. EOF
  1981. if { (eval echo configure:1982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1982.   rm -rf conftest*
  1983.   eval "ac_cv_func_accept=yes"
  1984. else
  1985.   echo "configure: failed program was:" >&5
  1986.   cat conftest.$ac_ext >&5
  1987.   rm -rf conftest*
  1988.   eval "ac_cv_func_accept=no"
  1989. fi
  1990. rm -f conftest*
  1991. fi
  1992.  
  1993. if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
  1994.   echo "$ac_t""yes" 1>&6
  1995.   tcl_checkNsl=0
  1996. else
  1997.   echo "$ac_t""no" 1>&6
  1998. LIBS=$tk_oldLibs
  1999. fi
  2000.  
  2001. fi
  2002. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  2003. echo "configure:2004: checking for gethostbyname" >&5
  2004. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  2005.   echo $ac_n "(cached) $ac_c" 1>&6
  2006. else
  2007.   cat > conftest.$ac_ext <<EOF
  2008. #line 2009 "configure"
  2009. #include "confdefs.h"
  2010. /* System header to define __stub macros and hopefully few prototypes,
  2011.     which can conflict with char gethostbyname(); below.  */
  2012. #include <assert.h>
  2013. /* Override any gcc2 internal prototype to avoid an error.  */
  2014. /* We use char because int might match the return type of a gcc2
  2015.     builtin and then its argument prototype would still apply.  */
  2016. char gethostbyname();
  2017.  
  2018. int main() {
  2019.  
  2020. /* The GNU C library defines this for functions which it implements
  2021.     to always fail with ENOSYS.  Some functions are actually named
  2022.     something starting with __ and the normal name is an alias.  */
  2023. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  2024. choke me
  2025. #else
  2026. gethostbyname();
  2027. #endif
  2028.  
  2029. ; return 0; }
  2030. EOF
  2031. if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2032.   rm -rf conftest*
  2033.   eval "ac_cv_func_gethostbyname=yes"
  2034. else
  2035.   echo "configure: failed program was:" >&5
  2036.   cat conftest.$ac_ext >&5
  2037.   rm -rf conftest*
  2038.   eval "ac_cv_func_gethostbyname=no"
  2039. fi
  2040. rm -f conftest*
  2041. fi
  2042.  
  2043. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  2044.   echo "$ac_t""yes" 1>&6
  2045.   :
  2046. else
  2047.   echo "$ac_t""no" 1>&6
  2048. echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
  2049. echo "configure:2050: checking for main in -lnsl" >&5
  2050. ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
  2051. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2052.   echo $ac_n "(cached) $ac_c" 1>&6
  2053. else
  2054.   ac_save_LIBS="$LIBS"
  2055. LIBS="-lnsl  $LIBS"
  2056. cat > conftest.$ac_ext <<EOF
  2057. #line 2058 "configure"
  2058. #include "confdefs.h"
  2059.  
  2060. int main() {
  2061. main()
  2062. ; return 0; }
  2063. EOF
  2064. if { (eval echo configure:2065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2065.   rm -rf conftest*
  2066.   eval "ac_cv_lib_$ac_lib_var=yes"
  2067. else
  2068.   echo "configure: failed program was:" >&5
  2069.   cat conftest.$ac_ext >&5
  2070.   rm -rf conftest*
  2071.   eval "ac_cv_lib_$ac_lib_var=no"
  2072. fi
  2073. rm -f conftest*
  2074. LIBS="$ac_save_LIBS"
  2075.  
  2076. fi
  2077. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2078.   echo "$ac_t""yes" 1>&6
  2079.   LIBS="$LIBS -lnsl"
  2080. else
  2081.   echo "$ac_t""no" 1>&6
  2082. fi
  2083.  
  2084. fi
  2085.  
  2086. echo $ac_n "checking for main in -linet""... $ac_c" 1>&6
  2087. echo "configure:2088: checking for main in -linet" >&5
  2088. ac_lib_var=`echo inet'_'main | sed 'y%./+-%__p_%'`
  2089. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2090.   echo $ac_n "(cached) $ac_c" 1>&6
  2091. else
  2092.   ac_save_LIBS="$LIBS"
  2093. LIBS="-linet  $LIBS"
  2094. cat > conftest.$ac_ext <<EOF
  2095. #line 2096 "configure"
  2096. #include "confdefs.h"
  2097.  
  2098. int main() {
  2099. main()
  2100. ; return 0; }
  2101. EOF
  2102. if { (eval echo configure:2103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2103.   rm -rf conftest*
  2104.   eval "ac_cv_lib_$ac_lib_var=yes"
  2105. else
  2106.   echo "configure: failed program was:" >&5
  2107.   cat conftest.$ac_ext >&5
  2108.   rm -rf conftest*
  2109.   eval "ac_cv_lib_$ac_lib_var=no"
  2110. fi
  2111. rm -f conftest*
  2112. LIBS="$ac_save_LIBS"
  2113.  
  2114. fi
  2115. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2116.   echo "$ac_t""yes" 1>&6
  2117.   LIBS="$LIBS -linet"
  2118. else
  2119.   echo "$ac_t""no" 1>&6
  2120. fi
  2121.  
  2122.  
  2123. if test $ac_cv_prog_gcc = yes; then
  2124.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  2125. echo "configure:2126: checking whether ${CC-cc} needs -traditional" >&5
  2126. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  2127.   echo $ac_n "(cached) $ac_c" 1>&6
  2128. else
  2129.     ac_pattern="Autoconf.*'x'"
  2130.   cat > conftest.$ac_ext <<EOF
  2131. #line 2132 "configure"
  2132. #include "confdefs.h"
  2133. #include <sgtty.h>
  2134. Autoconf TIOCGETP
  2135. EOF
  2136. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2137.   egrep "$ac_pattern" >/dev/null 2>&1; then
  2138.   rm -rf conftest*
  2139.   ac_cv_prog_gcc_traditional=yes
  2140. else
  2141.   rm -rf conftest*
  2142.   ac_cv_prog_gcc_traditional=no
  2143. fi
  2144. rm -f conftest*
  2145.  
  2146.  
  2147.   if test $ac_cv_prog_gcc_traditional = no; then
  2148.     cat > conftest.$ac_ext <<EOF
  2149. #line 2150 "configure"
  2150. #include "confdefs.h"
  2151. #include <termio.h>
  2152. Autoconf TCGETA
  2153. EOF
  2154. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2155.   egrep "$ac_pattern" >/dev/null 2>&1; then
  2156.   rm -rf conftest*
  2157.   ac_cv_prog_gcc_traditional=yes
  2158. fi
  2159. rm -f conftest*
  2160.  
  2161.   fi
  2162. fi
  2163.  
  2164. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  2165.   if test $ac_cv_prog_gcc_traditional = yes; then
  2166.     CC="$CC -traditional"
  2167.   fi
  2168. fi
  2169.  
  2170. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2171. echo "configure:2172: checking return type of signal handlers" >&5
  2172. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  2173.   echo $ac_n "(cached) $ac_c" 1>&6
  2174. else
  2175.   cat > conftest.$ac_ext <<EOF
  2176. #line 2177 "configure"
  2177. #include "confdefs.h"
  2178. #include <sys/types.h>
  2179. #include <signal.h>
  2180. #ifdef signal
  2181. #undef signal
  2182. #endif
  2183. #ifdef __cplusplus
  2184. extern "C" void (*signal (int, void (*)(int)))(int);
  2185. #else
  2186. void (*signal ()) ();
  2187. #endif
  2188.  
  2189. int main() {
  2190. int i;
  2191. ; return 0; }
  2192. EOF
  2193. if { (eval echo configure:2194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2194.   rm -rf conftest*
  2195.   ac_cv_type_signal=void
  2196. else
  2197.   echo "configure: failed program was:" >&5
  2198.   cat conftest.$ac_ext >&5
  2199.   rm -rf conftest*
  2200.   ac_cv_type_signal=int
  2201. fi
  2202. rm -f conftest*
  2203. fi
  2204.  
  2205. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2206. cat >> confdefs.h <<EOF
  2207. #define RETSIGTYPE $ac_cv_type_signal
  2208. EOF
  2209.  
  2210.  
  2211. for ac_func in atexit strchr strdup memcpy memmove strtoul cfmakeraw cfsetspeed cfsetispeed cfsetospeed sigaction dup2 inet_aton gethostname uname
  2212. do
  2213. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2214. echo "configure:2215: checking for $ac_func" >&5
  2215. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2216.   echo $ac_n "(cached) $ac_c" 1>&6
  2217. else
  2218.   cat > conftest.$ac_ext <<EOF
  2219. #line 2220 "configure"
  2220. #include "confdefs.h"
  2221. /* System header to define __stub macros and hopefully few prototypes,
  2222.     which can conflict with char $ac_func(); below.  */
  2223. #include <assert.h>
  2224. /* Override any gcc2 internal prototype to avoid an error.  */
  2225. /* We use char because int might match the return type of a gcc2
  2226.     builtin and then its argument prototype would still apply.  */
  2227. char $ac_func();
  2228.  
  2229. int main() {
  2230.  
  2231. /* The GNU C library defines this for functions which it implements
  2232.     to always fail with ENOSYS.  Some functions are actually named
  2233.     something starting with __ and the normal name is an alias.  */
  2234. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2235. choke me
  2236. #else
  2237. $ac_func();
  2238. #endif
  2239.  
  2240. ; return 0; }
  2241. EOF
  2242. if { (eval echo configure:2243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2243.   rm -rf conftest*
  2244.   eval "ac_cv_func_$ac_func=yes"
  2245. else
  2246.   echo "configure: failed program was:" >&5
  2247.   cat conftest.$ac_ext >&5
  2248.   rm -rf conftest*
  2249.   eval "ac_cv_func_$ac_func=no"
  2250. fi
  2251. rm -f conftest*
  2252. fi
  2253.  
  2254. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2255.   echo "$ac_t""yes" 1>&6
  2256.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2257.   cat >> confdefs.h <<EOF
  2258. #define $ac_tr_func 1
  2259. EOF
  2260.  
  2261. else
  2262.   echo "$ac_t""no" 1>&6
  2263. fi
  2264. done
  2265.  
  2266.  
  2267. echo $ac_n "checking for cispeed and cospeed members of struct termios""... $ac_c" 1>&6
  2268. echo "configure:2269: checking for cispeed and cospeed members of struct termios" >&5
  2269. if eval "test \"`echo '$''{'ac_cv_termios_cspeed'+set}'`\" = set"; then
  2270.   echo $ac_n "(cached) $ac_c" 1>&6
  2271. else
  2272.   cat > conftest.$ac_ext <<EOF
  2273. #line 2274 "configure"
  2274. #include "confdefs.h"
  2275. #include <termios.h>
  2276. int main() {
  2277. int main(void) {
  2278.  struct termios t;t.c_ispeed=t.c_ospeed=0;}
  2279. ; return 0; }
  2280. EOF
  2281. if { (eval echo configure:2282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2282.   rm -rf conftest*
  2283.   ac_cv_termios_cspeed=yes
  2284. else
  2285.   echo "configure: failed program was:" >&5
  2286.   cat conftest.$ac_ext >&5
  2287.   rm -rf conftest*
  2288.   ac_cv_termios_cspeed=no
  2289. fi
  2290. rm -f conftest*
  2291. fi
  2292.  
  2293. echo "$ac_t""$ac_cv_termios_cspeed" 1>&6
  2294. if test $ac_cv_termios_cspeed = yes; then
  2295.   cat >> confdefs.h <<\EOF
  2296. #define TERMIOS_CSPEED 1
  2297. EOF
  2298.  
  2299. fi
  2300.  
  2301. echo $ac_n "checking for sa_len""... $ac_c" 1>&6
  2302. echo "configure:2303: checking for sa_len" >&5
  2303. if eval "test \"`echo '$''{'ac_cv_sa_len'+set}'`\" = set"; then
  2304.   echo $ac_n "(cached) $ac_c" 1>&6
  2305. else
  2306.   cat > conftest.$ac_ext <<EOF
  2307. #line 2308 "configure"
  2308. #include "confdefs.h"
  2309. #include <sys/types.h>
  2310. #include <sys/socket.h>
  2311. int main() {
  2312. int main(void) {
  2313.  struct sockaddr t;t.sa_len = 0;}
  2314. ; return 0; }
  2315. EOF
  2316. if { (eval echo configure:2317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2317.   rm -rf conftest*
  2318.   ac_cv_sa_len=yes
  2319. else
  2320.   echo "configure: failed program was:" >&5
  2321.   cat conftest.$ac_ext >&5
  2322.   rm -rf conftest*
  2323.   ac_cv_sa_len=no
  2324. fi
  2325. rm -f conftest*
  2326. fi
  2327.  
  2328. echo "$ac_t""$ac_cv_sa_len" 1>&6
  2329. if test $ac_cv_sa_len = yes; then
  2330.   cat >> confdefs.h <<\EOF
  2331. #define HAVE_SA_LEN 1
  2332. EOF
  2333.  
  2334. fi
  2335.  
  2336. # Check whether --with-tcl or --without-tcl was given.
  2337. if test "${with_tcl+set}" = set; then
  2338.   withval="$with_tcl"
  2339.   :
  2340. fi
  2341.  
  2342. # Check whether --with-itcl or --without-itcl was given.
  2343. if test "${with_itcl+set}" = set; then
  2344.   withval="$with_itcl"
  2345.   :
  2346. fi
  2347.  
  2348. # Check whether --with-tk or --without-tk was given.
  2349. if test "${with_tk+set}" = set; then
  2350.   withval="$with_tk"
  2351.   :
  2352. fi
  2353.  
  2354. # Check whether --with-python or --without-python was given.
  2355. if test "${with_python+set}" = set; then
  2356.   withval="$with_python"
  2357.   :
  2358. fi
  2359.  
  2360. # Check whether --with-java or --without-java was given.
  2361. if test "${with_java+set}" = set; then
  2362.   withval="$with_java"
  2363.   :
  2364. fi
  2365.  
  2366. # Check whether --with-perl5 or --without-perl5 was given.
  2367. if test "${with_perl5+set}" = set; then
  2368.   withval="$with_perl5"
  2369.   :
  2370. fi
  2371.  
  2372.  
  2373. if test "x$with_perl5" = "xno"; then
  2374.     PERL5=''
  2375. else
  2376.     if test "x$with_perl5" != "xyes" && test "x$with_perl5" != "x"; then
  2377.         PERL5="$with_perl5"
  2378.     else
  2379.         # Extract the first word of "perl", so it can be a program name with args.
  2380. set dummy perl; ac_word=$2
  2381. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2382. echo "configure:2383: checking for $ac_word" >&5
  2383. if eval "test \"`echo '$''{'ac_cv_path_PERL5'+set}'`\" = set"; then
  2384.   echo $ac_n "(cached) $ac_c" 1>&6
  2385. else
  2386.   case "$PERL5" in
  2387.   /*)
  2388.   ac_cv_path_PERL5="$PERL5" # Let the user override the test with a path.
  2389.   ;;
  2390.   *)
  2391.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2392.   for ac_dir in $PATH; do
  2393.     test -z "$ac_dir" && ac_dir=.
  2394.     if test -f $ac_dir/$ac_word; then
  2395.       ac_cv_path_PERL5="$ac_dir/$ac_word"
  2396.       break
  2397.     fi
  2398.   done
  2399.   IFS="$ac_save_ifs"
  2400.   ;;
  2401. esac
  2402. fi
  2403. PERL5="$ac_cv_path_PERL5"
  2404. if test -n "$PERL5"; then
  2405.   echo "$ac_t""$PERL5" 1>&6
  2406. else
  2407.   echo "$ac_t""no" 1>&6
  2408. fi
  2409.  
  2410.     fi
  2411. fi
  2412.  
  2413. if test "x$PERL5" != "x"; then
  2414.     case `$PERL5 -e 'print $]'` in
  2415.         *5.*) WITHPERL5='WITHPERL5' ;;
  2416.         *)    PERL5='' ;;
  2417.     esac
  2418. fi
  2419.  
  2420. echo $ac_n "checking for Java Development Kit""... $ac_c" 1>&6
  2421. echo "configure:2422: checking for Java Development Kit" >&5
  2422. if test "x$with_java" = "xyes" || test "x$with_java" = "x" ; then
  2423.     for java_path in /usr/local/java /usr/local /usr/java /usr; do
  2424.         if test -f $java_path/bin/javac; then
  2425.             with_java=$java_path; break
  2426.         fi
  2427.     done
  2428.     if test "x$with_java" = "xyes"; then
  2429.         echo "Unable to find Java base installation directory."
  2430.         echo "Please give directory (such as /usr/local) as argument to --with-java=dir."
  2431.         with_java=no
  2432.     fi
  2433. fi 
  2434. if test "x$with_java" = "x"; then
  2435.     with_java=no
  2436. fi
  2437. JAVABASE=''
  2438. if test "x$with_java" != "xno"; then
  2439.     # I'd like to check Java for version, but it doesn't seem to know how to do that. Odd.
  2440.     cat >test.java <<EOF
  2441.     public class test { public static void main(String[] args) { 
  2442.         System.out.println("present");
  2443.     } }
  2444. EOF
  2445.     $with_java/bin/javac test.java
  2446.     case `$with_java/bin/java test` in
  2447.         *present*) echo "$ac_t""found in $with_java" 1>&6 
  2448.             WITHJAVA='WITHJAVA'
  2449.             JAVABASE="$with_java"
  2450.             javaos="$host_os"
  2451.             case "$javaos" in
  2452.               linux-gnu) javaos="$javaos linux" ;;
  2453.               solaris) javaos="$javaos sunos sun" ;;
  2454.               sunos) javaos="$javaos solaris sun" ;;
  2455.             esac
  2456.             JAVAARCH="genunix"
  2457.             for i in $javaos genunix; do
  2458.               if test -f "$JAVABASE/include/$i/byteorder_md.h"; then
  2459.                 JAVAARCH="$i"
  2460.                 break
  2461.               fi
  2462.             done
  2463.             JAVAMAJOR=1
  2464.             if test -f "$JAVABASE/include/$JAVAARCH/jni_md.h"; then
  2465.               JAVAMINOR=1
  2466.             else
  2467.               JAVAMINOR=0
  2468.             fi
  2469.             ;;
  2470.         *)    echo "$ac_t""not found" 1>&6
  2471.             with_java=no ;;
  2472.     esac
  2473.     rm -f test.java test.class
  2474. else
  2475.     echo "$ac_t""not found" 1>&6
  2476. fi
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482. if test "x$PERL5" = "x"; then
  2483.     PERL5="/usr/bin/perl"
  2484. fi
  2485.  
  2486. itcl=''
  2487. if test "x$with_tcl" = "xyes" || test "x$with_tcl" = "x" ; then
  2488.     for tcl_path in /usr/local/tcl8.0 /usr/local/tcl7.6 /usr/local/tcl7.5 /usr/local /usr /usr/local/tcl7.4; do
  2489.         if test -f $tcl_path/lib/tclConfig.sh; then
  2490.             with_tcl=$tcl_path; break
  2491.         elif test -f $tcl_path/lib/itcl/tclConfig.sh; then
  2492.             itcl='/itcl'
  2493.             with_tcl=$tcl_path; break
  2494.         fi
  2495.     done
  2496.     if test "x$with_tcl" = "xyes"; then
  2497.         echo "Unable to find Tcl base installation directory."
  2498.         echo "Please give directory (such as /usr/local) as argument to --with-tcl=dir."
  2499.         with_tcl=no
  2500.     fi
  2501. else
  2502.     if test -f $with_tcl/lib/itcl/tclConfig.sh; then
  2503.         itcl='/itcl'
  2504.     fi
  2505. fi 
  2506.  
  2507. echo $ac_n "checking for Tcl""... $ac_c" 1>&6
  2508. echo "configure:2509: checking for Tcl" >&5
  2509. TCL_VERSION=""
  2510. TCL_LIBS=""
  2511. TCL_LIB_SPEC=""
  2512. TCL_PACKAGE_SPEC=""
  2513. TCL_INC=""
  2514. TCL_BIN=""
  2515. TK_VERSION=""
  2516. TK_LIBS=""
  2517. TK_LIB_SPEC=""
  2518. TK_INC=""
  2519. TK_BIN=""
  2520. TCLTK_FLAGS=""
  2521. TCLTKFLAGS=""
  2522. TCLLIBS=""
  2523. TKLIBS=""
  2524. TCLTKLIBS=""
  2525. if test "x$with_tcl" = "x"; then
  2526.     echo "$ac_t""not found" 1>&6
  2527. elif test "x$with_tcl" = "xno"; then
  2528.     echo "$ac_t""not used" 1>&6
  2529. else
  2530.     tclConfig="$with_tcl/lib$itcl/tclConfig.sh"
  2531.     if test ! -f $tclConfig; then
  2532.         echo "$ac_t""Unable to find tclConfig.sh" 1>&6
  2533.     else
  2534.         . $tclConfig
  2535.         echo "$ac_t""version $TCL_VERSION from $tclConfig" 1>&6
  2536.         TCL_INC="-I$TCL_PREFIX/include$itcl"
  2537.         TCL_BIN="$TCL_EXEC_PREFIX/bin"
  2538.         TCLLIBS="$TCL_LIB_SPEC $TCL_LIBS"
  2539.         TCLTKLIBS="$TCLLIBS"
  2540.         TCLTK_LIBS="\$(TCL_LIB_SPEC) \$(TCL_LIBS)"
  2541.         TCLTK_FLAGS="-DTCL \$(TCL_INC)"
  2542.         TCLTKFLAGS="-DTCL $TCL_INC"
  2543.         WITHTCL='WITHTCL'
  2544.         
  2545.         if test "x$with_itcl" = "xyes" || test "x$with_itcl" = "x"; then
  2546.             for itcl_path in $with_tcl; do
  2547.                 if test -f $itcl_path/lib$itcl/itclConfig.sh; then
  2548.                     with_itcl=$itcl_path; break
  2549.                 fi
  2550.             done
  2551.             if test "x$with_itcl" = "xyes"; then
  2552.                 echo "Unable to find Itcl base installation directory."
  2553.                 echo "Please give directory (such as /usr/local/itcl2.2) as argument to --with-itcl=dir."
  2554.                 with_itcl=no
  2555.             fi
  2556.         fi 
  2557.  
  2558.         echo $ac_n "checking for Itcl""... $ac_c" 1>&6
  2559. echo "configure:2560: checking for Itcl" >&5
  2560.         if test "x$with_itcl" = "x"; then
  2561.             echo "$ac_t""not found" 1>&6
  2562.         elif test "x$with_itcl" = "xno"; then
  2563.             echo "$ac_t""not used" 1>&6
  2564.         else
  2565.             itclConfig="$with_itcl/lib$itcl/itclConfig.sh"
  2566.             if test ! -f $itclConfig; then
  2567.                 echo "$ac_t""Unable to find itclConfig.sh" 1>&6
  2568.             else
  2569.                 . $itclConfig
  2570.                 echo "$ac_t""version $ITCL_VERSION from $itclConfig" 1>&6
  2571.                 ITCL_INC="-I$TK_PREFIX/include$itcl"
  2572.                 #TK_BIN="$TK_EXEC_PREFIX/bin"
  2573.                 #TKLIBS="$TK_LIB_SPEC $TCL_LIB_SPEC $TK_LIBS"
  2574.                 #TCLTK_LIBS="\$(TK_LIB_SPEC) \$(TCL_LIB_SPEC) \$(TK_LIBS)"
  2575.                 #TCLTK_FLAGS="$TCLTK_FLAGS -DTK \$(TK_INC)"
  2576.                 #TCLTKLIBS="$TKLIBS"
  2577.                 #WITHTK='WITHTK'
  2578.                 if test "x$ITCL_INC" = "x$TCL_INC"; then
  2579.                     ITCL_INC=" #same as TCL_INC"
  2580.                 #    TCLTKFLAGS="-DTCL -DTK $TCL_INC"
  2581.                 #else
  2582.                 #    TCLTKFLAGS="-DTCL -DTK $TCL_INC $TK_INC"
  2583.                 fi
  2584.             fi
  2585.         fi
  2586.  
  2587.         if test "x$with_tk" = "xyes" || test "x$with_tk" = "x"; then
  2588.             for tk_path in $with_tcl; do
  2589.                 if test -f $tk_path/lib$itcl/tkConfig.sh; then
  2590.                     with_tk=$tk_path; break
  2591.                 fi
  2592.             done
  2593.             if test "x$with_tk" = "xyes"; then
  2594.                 echo "Unable to find Tk base installation directory."
  2595.                 echo "Please give directory (such as /usr/local) as argument to --with-tk=dir."
  2596.                 with_tk=no
  2597.             fi
  2598.         fi 
  2599.         
  2600.         echo $ac_n "checking for Tk""... $ac_c" 1>&6
  2601. echo "configure:2602: checking for Tk" >&5
  2602.         if test "x$with_tk" = "x"; then
  2603.             echo "$ac_t""not found" 1>&6
  2604.         elif test "x$with_tk" = "xno"; then
  2605.             echo "$ac_t""not used" 1>&6
  2606.         else
  2607.             tkConfig="$with_tk/lib$itcl/tkConfig.sh"
  2608.             if test ! -f $tkConfig; then
  2609.                 echo "$ac_t""Unable to find tkConfig.sh" 1>&6
  2610.             else
  2611.                 . $tkConfig
  2612.                 echo "$ac_t""version $TK_VERSION from $tkConfig" 1>&6
  2613.                 TK_INC="-I$TK_PREFIX/include$itcl"
  2614.                 TK_BIN="$TK_EXEC_PREFIX/bin"
  2615.                 TKLIBS="$TK_LIB_SPEC $TCL_LIB_SPEC $TK_LIBS"
  2616.                 TCLTK_LIBS="\$(TK_LIB_SPEC) \$(TCL_LIB_SPEC) \$(TK_LIBS)"
  2617.                 TCLTK_FLAGS="$TCLTK_FLAGS -DTK \$(TK_INC)"
  2618.                 TCLTKLIBS="$TKLIBS"
  2619.                 WITHTK='WITHTK'
  2620.                 if test "x$TK_INC" = "x$TCL_INC"; then
  2621.                     TK_INC=" #same as TCL_INC"
  2622.                     TCLTKFLAGS="-DTCL -DTK $TCL_INC"
  2623.                 else
  2624.                     TCLTKFLAGS="-DTCL -DTK $TCL_INC $TK_INC"
  2625.                 fi
  2626.             fi
  2627.         fi
  2628.  
  2629.  
  2630.     fi
  2631. fi
  2632.  
  2633. TCL_PACKAGE_PATH=`echo $TCL_PACKAGE_PATH | sed 's/ .*//'`
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654. TCLEXECS=''
  2655. if test ! "x$TCL_VERSION" = "x"; then
  2656.     TCLEXECS='pilot-debug$(EXT)'
  2657. fi
  2658.  
  2659.  
  2660.  
  2661. if test "x$with_python" = "xyes" || test "x$with_python" = "x" ; then
  2662.     for py_path in /usr /usr/local /usr/local/python1.3 /usr/local/python1.4 /usr/local/python1.5; do
  2663.         for ver in 1.5 1.4 1.3; do
  2664.             if test -f $py_path/lib/python$ver/config/Makefile ; then
  2665.                 with_python=$py_path; break
  2666.             fi
  2667.         done
  2668.     done
  2669.     if test "x$with_python" = "xyes"; then
  2670.         echo "Unable to find Python base directory."
  2671.         echo "Please give directory (such as /usr/local/) as argument to --with-python=dir."
  2672.         with_python=no
  2673.     fi
  2674. fi 
  2675.  
  2676. echo $ac_n "checking for Python""... $ac_c" 1>&6
  2677. echo "configure:2678: checking for Python" >&5
  2678.  
  2679. PYTHONBASE=''
  2680. PYTHONLIBDIR=''
  2681. PYTHONINCDIR=''
  2682. PYTHONVER=''
  2683. if test "x$with_python" = "x"; then
  2684.     echo "$ac_t""not found" 1>&6
  2685. elif test "x$with_python" = "xno"; then
  2686.     echo "$ac_t""not used" 1>&6
  2687. else
  2688.     for ver in 1.5 1.4 1.3; do
  2689.         if test -f $with_python/lib/python$ver/config/Makefile ; then
  2690.             PYTHONVER=$ver; break
  2691.         fi
  2692.     done
  2693.     
  2694.     if test ! -f $with_python/include/python$PYTHONVER/Python.h; then
  2695.         echo "$ac_t""Unable to find $with_python/include/python$PYTHONVER/Python.h" 1>&6
  2696.     elif test ! -f $with_python/lib/python$PYTHONVER/config/Makefile; then
  2697.         echo "$ac_t""Unable to find $with_python/config/Makefile" 1>&6
  2698.     else
  2699.         echo "$ac_t""Python version $PYTHONVER in $with_python" 1>&6
  2700.         PYTHONBASE=$with_python
  2701.         PYTHONLIBDIR=$with_python/lib/python$PYTHONVER
  2702.         PYTHONINCDIR=$with_python/include/python$PYTHONVER
  2703.         WITHPYTHON='WITHPYTHON'
  2704.     fi
  2705. fi
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711. echo $ac_n "checking for maximum warnings compiler flag""... $ac_c" 1>&6
  2712. echo "configure:2713: checking for maximum warnings compiler flag" >&5
  2713. if eval "test \"`echo '$''{'ac_cv_cwflag'+set}'`\" = set"; then
  2714.   echo $ac_n "(cached) $ac_c" 1>&6
  2715. else
  2716.   case "${CC-cc}" in
  2717.   *gcc*) ac_cv_cwflag=-Wall;;
  2718.   *)    case "$host" in
  2719.             *irix*)    ac_cv_cwflag=-fullwarn ;;
  2720.             *)        ac_cv_cwflag=;;
  2721.         esac ;;
  2722. esac
  2723. fi
  2724.  
  2725. echo "$ac_t""$ac_cv_cwflag" 1>&6
  2726. CWFLAG=$ac_cv_cwflag
  2727.  
  2728.  
  2729. case "$host" in
  2730.     *next*) CPLIB="ln -s"
  2731.             ARFLAGS="cur" ;;
  2732.     *)      CPLIB="cp"
  2733.             ARFLAGS="cur" ;;
  2734. esac
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740. if test $ac_cv_prog_cxx_works = yes; then
  2741.   cc_m='libcc/Makefile'
  2742. fi
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751. LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/\.lo/g'`
  2752.  
  2753. LTALLOCA=`echo "$ALLOCA" | sed 's/\.o/\.lo/g'`
  2754.  
  2755. trap '' 1 2 15
  2756. cat > confcache <<\EOF
  2757. # This file is a shell script that caches the results of configure
  2758. # tests run on this system so they can be shared between configure
  2759. # scripts and configure runs.  It is not useful on other systems.
  2760. # If it contains results you don't want to keep, you may remove or edit it.
  2761. #
  2762. # By default, configure uses ./config.cache as the cache file,
  2763. # creating it if it does not exist already.  You can give configure
  2764. # the --cache-file=FILE option to use a different cache file; that is
  2765. # what configure does when it calls configure scripts in
  2766. # subdirectories, so they share the cache.
  2767. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2768. # config.status only pays attention to the cache file if you give it the
  2769. # --recheck option to rerun configure.
  2770. #
  2771. EOF
  2772. # The following way of writing the cache mishandles newlines in values,
  2773. # but we know of no workaround that is simple, portable, and efficient.
  2774. # So, don't put newlines in cache variables' values.
  2775. # Ultrix sh set writes to stderr and can't be redirected directly,
  2776. # and sets the high bit in the cache file unless we assign to the vars.
  2777. (set) 2>&1 |
  2778.   case `(ac_space=' '; set) 2>&1` in
  2779.   *ac_space=\ *)
  2780.     # `set' does not quote correctly, so add quotes (double-quote substitution
  2781.     # turns \\\\ into \\, and sed turns \\ into \).
  2782.     sed -n \
  2783.       -e "s/'/'\\\\''/g" \
  2784.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2785.     ;;
  2786.   *)
  2787.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  2788.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2789.     ;;
  2790.   esac >> confcache
  2791. if cmp -s $cache_file confcache; then
  2792.   :
  2793. else
  2794.   if test -w $cache_file; then
  2795.     echo "updating cache $cache_file"
  2796.     cat confcache > $cache_file
  2797.   else
  2798.     echo "not updating unwritable cache $cache_file"
  2799.   fi
  2800. fi
  2801. rm -f confcache
  2802.  
  2803. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2804.  
  2805. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2806. # Let make expand exec_prefix.
  2807. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2808.  
  2809. # Any assignment to VPATH causes Sun make to only execute
  2810. # the first set of double-colon rules, so remove it if not needed.
  2811. # If there is a colon in the path, we need to keep it.
  2812. if test "x$srcdir" = x.; then
  2813.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2814. fi
  2815.  
  2816. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2817.  
  2818. DEFS=-DHAVE_CONFIG_H
  2819.  
  2820. # Without the "./", some shells look in PATH for config.status.
  2821. : ${CONFIG_STATUS=./config.status}
  2822.  
  2823. echo creating $CONFIG_STATUS
  2824. rm -f $CONFIG_STATUS
  2825. cat > $CONFIG_STATUS <<EOF
  2826. #! /bin/sh
  2827. # Generated automatically by configure.
  2828. # Run this file to recreate the current configuration.
  2829. # This directory was configured as follows,
  2830. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2831. #
  2832. # $0 $ac_configure_args
  2833. #
  2834. # Compiler output produced by configure, useful for debugging
  2835. # configure, is in ./config.log if it exists.
  2836.  
  2837. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2838. for ac_option
  2839. do
  2840.   case "\$ac_option" in
  2841.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2842.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2843.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2844.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2845.     echo "$CONFIG_STATUS generated by autoconf version 2.12"
  2846.     exit 0 ;;
  2847.   -help | --help | --hel | --he | --h)
  2848.     echo "\$ac_cs_usage"; exit 0 ;;
  2849.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2850.   esac
  2851. done
  2852.  
  2853. ac_given_srcdir=$srcdir
  2854. ac_given_INSTALL="$INSTALL"
  2855.  
  2856. trap 'rm -fr `echo "libsock/Makefile $cc_m Makefile Python/Makefile Tcl/Makefile Perl5/Makefile.PL Java/Makefile tests/Makefile include/pi-config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2857. EOF
  2858. cat >> $CONFIG_STATUS <<EOF
  2859.  
  2860. # Protect against being on the right side of a sed subst in config.status.
  2861. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2862.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2863. $ac_vpsub
  2864. $extrasub
  2865. s%@CFLAGS@%$CFLAGS%g
  2866. s%@CPPFLAGS@%$CPPFLAGS%g
  2867. s%@CXXFLAGS@%$CXXFLAGS%g
  2868. s%@DEFS@%$DEFS%g
  2869. s%@LDFLAGS@%$LDFLAGS%g
  2870. s%@LIBS@%$LIBS%g
  2871. s%@exec_prefix@%$exec_prefix%g
  2872. s%@prefix@%$prefix%g
  2873. s%@program_transform_name@%$program_transform_name%g
  2874. s%@bindir@%$bindir%g
  2875. s%@sbindir@%$sbindir%g
  2876. s%@libexecdir@%$libexecdir%g
  2877. s%@datadir@%$datadir%g
  2878. s%@sysconfdir@%$sysconfdir%g
  2879. s%@sharedstatedir@%$sharedstatedir%g
  2880. s%@localstatedir@%$localstatedir%g
  2881. s%@libdir@%$libdir%g
  2882. s%@includedir@%$includedir%g
  2883. s%@oldincludedir@%$oldincludedir%g
  2884. s%@infodir@%$infodir%g
  2885. s%@mandir@%$mandir%g
  2886. s%@host@%$host%g
  2887. s%@host_alias@%$host_alias%g
  2888. s%@host_cpu@%$host_cpu%g
  2889. s%@host_vendor@%$host_vendor%g
  2890. s%@host_os@%$host_os%g
  2891. s%@CC@%$CC%g
  2892. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2893. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2894. s%@RANLIB@%$RANLIB%g
  2895. s%@LD@%$LD%g
  2896. s%@LN_S@%$LN_S%g
  2897. s%@LIBTOOL@%$LIBTOOL%g
  2898. s%@YACC@%$YACC%g
  2899. s%@CXX@%$CXX%g
  2900. s%@ccexecs@%$ccexecs%g
  2901. s%@cclib@%$cclib%g
  2902. s%@libcclib@%$libcclib%g
  2903. s%@SUBMAKE_COMM@%$SUBMAKE_COMM%g
  2904. s%@SUBMAKE_COMM_CC@%$SUBMAKE_COMM_CC%g
  2905. s%@EXT@%$EXT%g
  2906. s%@CXXLIBS@%$CXXLIBS%g
  2907. s%@RLLIBS@%$RLLIBS%g
  2908. s%@RLDEFS@%$RLDEFS%g
  2909. s%@CPP@%$CPP%g
  2910. s%@PERL5@%$PERL5%g
  2911. s%@JAVABASE@%$JAVABASE%g
  2912. s%@JAVAARCH@%$JAVAARCH%g
  2913. s%@JAVAMAJOR@%$JAVAMAJOR%g
  2914. s%@JAVAMINOR@%$JAVAMINOR%g
  2915. s%@TCL_VERSION@%$TCL_VERSION%g
  2916. s%@TCL_LIBS@%$TCL_LIBS%g
  2917. s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
  2918. s%@TCL_PACKAGE_PATH@%$TCL_PACKAGE_PATH%g
  2919. s%@TCL_INC@%$TCL_INC%g
  2920. s%@TCL_BIN@%$TCL_BIN%g
  2921. s%@TK_VERSION@%$TK_VERSION%g
  2922. s%@TK_LIBS@%$TK_LIBS%g
  2923. s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
  2924. s%@TK_INC@%$TK_INC%g
  2925. s%@TK_BIN@%$TK_BIN%g
  2926. s%@TCLTK_LIBS@%$TCLTK_LIBS%g
  2927. s%@TCLTK_FLAGS@%$TCLTK_FLAGS%g
  2928. s%@TCLLIBS@%$TCLLIBS%g
  2929. s%@TKLIBS@%$TKLIBS%g
  2930. s%@TCLTKLIBS@%$TCLTKLIBS%g
  2931. s%@TCLTKFLAGS@%$TCLTKFLAGS%g
  2932. s%@TCLEXECS@%$TCLEXECS%g
  2933. s%@PYTHONBASE@%$PYTHONBASE%g
  2934. s%@PYTHONLIBDIR@%$PYTHONLIBDIR%g
  2935. s%@PYTHONINCDIR@%$PYTHONINCDIR%g
  2936. s%@PYTHONVER@%$PYTHONVER%g
  2937. s%@CWFLAG@%$CWFLAG%g
  2938. s%@CPLIB@%$CPLIB%g
  2939. s%@ARFLAGS@%$ARFLAGS%g
  2940. s%@WITHTCL@%$WITHTCL%g
  2941. s%@WITHJAVA@%$WITHJAVA%g
  2942. s%@WITHTK@%$WITHTK%g
  2943. s%@WITHPYTHON@%$WITHPYTHON%g
  2944. s%@WITHPERL5@%$WITHPERL5%g
  2945. s%@WITHCXX@%$WITHCXX%g
  2946. s%@LTLIBOBJS@%$LTLIBOBJS%g
  2947. s%@LTALLOCA@%$LTALLOCA%g
  2948.  
  2949. CEOF
  2950. EOF
  2951.  
  2952. cat >> $CONFIG_STATUS <<\EOF
  2953.  
  2954. # Split the substitutions into bite-sized pieces for seds with
  2955. # small command number limits, like on Digital OSF/1 and HP-UX.
  2956. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  2957. ac_file=1 # Number of current file.
  2958. ac_beg=1 # First line for current file.
  2959. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  2960. ac_more_lines=:
  2961. ac_sed_cmds=""
  2962. while $ac_more_lines; do
  2963.   if test $ac_beg -gt 1; then
  2964.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  2965.   else
  2966.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  2967.   fi
  2968.   if test ! -s conftest.s$ac_file; then
  2969.     ac_more_lines=false
  2970.     rm -f conftest.s$ac_file
  2971.   else
  2972.     if test -z "$ac_sed_cmds"; then
  2973.       ac_sed_cmds="sed -f conftest.s$ac_file"
  2974.     else
  2975.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  2976.     fi
  2977.     ac_file=`expr $ac_file + 1`
  2978.     ac_beg=$ac_end
  2979.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  2980.   fi
  2981. done
  2982. if test -z "$ac_sed_cmds"; then
  2983.   ac_sed_cmds=cat
  2984. fi
  2985. EOF
  2986.  
  2987. cat >> $CONFIG_STATUS <<EOF
  2988.  
  2989. CONFIG_FILES=\${CONFIG_FILES-"libsock/Makefile $cc_m Makefile Python/Makefile Tcl/Makefile Perl5/Makefile.PL Java/Makefile tests/Makefile"}
  2990. EOF
  2991. cat >> $CONFIG_STATUS <<\EOF
  2992. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2993.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2994.   case "$ac_file" in
  2995.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2996.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2997.   *) ac_file_in="${ac_file}.in" ;;
  2998.   esac
  2999.  
  3000.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  3001.  
  3002.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3003.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3004.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3005.     # The file is in a subdirectory.
  3006.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3007.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3008.     # A "../" for each directory in $ac_dir_suffix.
  3009.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3010.   else
  3011.     ac_dir_suffix= ac_dots=
  3012.   fi
  3013.  
  3014.   case "$ac_given_srcdir" in
  3015.   .)  srcdir=.
  3016.       if test -z "$ac_dots"; then top_srcdir=.
  3017.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3018.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3019.   *) # Relative path.
  3020.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3021.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3022.   esac
  3023.  
  3024.   case "$ac_given_INSTALL" in
  3025.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3026.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3027.   esac
  3028.  
  3029.   echo creating "$ac_file"
  3030.   rm -f "$ac_file"
  3031.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3032.   case "$ac_file" in
  3033.   *Makefile*) ac_comsub="1i\\
  3034. # $configure_input" ;;
  3035.   *) ac_comsub= ;;
  3036.   esac
  3037.  
  3038.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3039.   sed -e "$ac_comsub
  3040. s%@configure_input@%$configure_input%g
  3041. s%@srcdir@%$srcdir%g
  3042. s%@top_srcdir@%$top_srcdir%g
  3043. s%@INSTALL@%$INSTALL%g
  3044. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  3045. fi; done
  3046. rm -f conftest.s*
  3047.  
  3048. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3049. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3050. #
  3051. # ac_d sets the value in "#define NAME VALUE" lines.
  3052. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3053. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3054. ac_dC='\3'
  3055. ac_dD='%g'
  3056. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3057. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3058. ac_uB='\([     ]\)%\1#\2define\3'
  3059. ac_uC=' '
  3060. ac_uD='\4%g'
  3061. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3062. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3063. ac_eB='$%\1#\2define\3'
  3064. ac_eC=' '
  3065. ac_eD='%g'
  3066.  
  3067. if test "${CONFIG_HEADERS+set}" != set; then
  3068. EOF
  3069. cat >> $CONFIG_STATUS <<EOF
  3070.   CONFIG_HEADERS="include/pi-config.h"
  3071. EOF
  3072. cat >> $CONFIG_STATUS <<\EOF
  3073. fi
  3074. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3075.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3076.   case "$ac_file" in
  3077.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3078.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3079.   *) ac_file_in="${ac_file}.in" ;;
  3080.   esac
  3081.  
  3082.   echo creating $ac_file
  3083.  
  3084.   rm -f conftest.frag conftest.in conftest.out
  3085.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3086.   cat $ac_file_inputs > conftest.in
  3087.  
  3088. EOF
  3089.  
  3090. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3091. # the proper values into config.h.in to produce config.h.  And first:
  3092. # Protect against being on the right side of a sed subst in config.status.
  3093. # Protect against being in an unquoted here document in config.status.
  3094. rm -f conftest.vals
  3095. cat > conftest.hdr <<\EOF
  3096. s/[\\&%]/\\&/g
  3097. s%[\\$`]%\\&%g
  3098. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3099. s%ac_d%ac_u%gp
  3100. s%ac_u%ac_e%gp
  3101. EOF
  3102. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3103. rm -f conftest.hdr
  3104.  
  3105. # This sed command replaces #undef with comments.  This is necessary, for
  3106. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3107. # on some systems where configure will not decide to define it.
  3108. cat >> conftest.vals <<\EOF
  3109. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3110. EOF
  3111.  
  3112. # Break up conftest.vals because some shells have a limit on
  3113. # the size of here documents, and old seds have small limits too.
  3114.  
  3115. rm -f conftest.tail
  3116. while :
  3117. do
  3118.   ac_lines=`grep -c . conftest.vals`
  3119.   # grep -c gives empty output for an empty file on some AIX systems.
  3120.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3121.   # Write a limited-size here document to conftest.frag.
  3122.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3123.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3124.   echo 'CEOF
  3125.   sed -f conftest.frag conftest.in > conftest.out
  3126.   rm -f conftest.in
  3127.   mv conftest.out conftest.in
  3128. ' >> $CONFIG_STATUS
  3129.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3130.   rm -f conftest.vals
  3131.   mv conftest.tail conftest.vals
  3132. done
  3133. rm -f conftest.vals
  3134.  
  3135. cat >> $CONFIG_STATUS <<\EOF
  3136.   rm -f conftest.frag conftest.h
  3137.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3138.   cat conftest.in >> conftest.h
  3139.   rm -f conftest.in
  3140.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3141.     echo "$ac_file is unchanged"
  3142.     rm -f conftest.h
  3143.   else
  3144.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3145.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3146.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3147.       # The file is in a subdirectory.
  3148.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3149.     fi
  3150.     rm -f $ac_file
  3151.     mv conftest.h $ac_file
  3152.   fi
  3153. fi; done
  3154.  
  3155. EOF
  3156. cat >> $CONFIG_STATUS <<EOF
  3157.  
  3158. EOF
  3159. cat >> $CONFIG_STATUS <<\EOF
  3160.  
  3161. exit 0
  3162. EOF
  3163. chmod +x $CONFIG_STATUS
  3164. rm -fr confdefs* $ac_clean_files
  3165. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3166.  
  3167.